Welcome to MobyThreads.com!
FAQFAQ      ProfileProfile    Private MessagesPrivate Messages   Log inLog in
All support for the MobyThreads Threaded phpBB MOD can now be found on welsolutions at this forum

Detecting search engine queries

 
   Web Hosting and Web Master Forums (Home) -> Webmaster RSS
Next:  You know you're a geek when  
Author Message
anon3

External


Since: Mar 15, 2004
Posts: 1



(Msg. 1) Posted: Mon Mar 15, 2004 9:42 am
Post subject: Detecting search engine queries
Archived from groups: alt>www>webmaster (more info?)

Hi everyone. I am making some changes to my existing site, and have noticed
the following on other sites, and am looking at incorporating this into my
site:

1) I type a search into google, say "watermelon"
2) The results come up in google
3) I click an a link, and the site I am taken to has automagically
highlighted any reference to 'watermelon' on the site (not the google cache,
but the actual site itself)

Any quick pointers on what to look for to do this? The page is in php so I
have access to the server variables if that is the correct place to look,
but a tutorial or a brief overview would be very helpful.

Thanks!

 >> Stay informed about: Detecting search engine queries 
Back to top
Login to vote
user162

External


Since: Jul 31, 2003
Posts: 67



(Msg. 2) Posted: Mon Mar 15, 2004 11:06 am
Post subject: Re: Detecting search engine queries [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

"anon" <anon DeleteThis @example.com> wrote in message
news:mfc5c.38648$1Y2.21828@newssvr25.news.prodigy.com...
 > Hi everyone. I am making some changes to my existing site, and have
noticed
 > the following on other sites, and am looking at incorporating this into my
 > site:
 >
 > 1) I type a search into google, say "watermelon"
 > 2) The results come up in google
 > 3) I click an a link, and the site I am taken to has automagically
 > highlighted any reference to 'watermelon' on the site (not the google
cache,
 > but the actual site itself)
 >
 > Any quick pointers on what to look for to do this? The page is in php so
I
 > have access to the server variables if that is the correct place to look,
 > but a tutorial or a brief overview would be very helpful.

Please provide a search argument and a site to look at where this happens
because, basically, I don't believe you Smile

Cheers
Richard.<!-- ~MESSAGE_AFTER~ -->

 >> Stay informed about: Detecting search engine queries 
Back to top
Login to vote
user172

External


Since: Aug 08, 2003
Posts: 70



(Msg. 3) Posted: Mon Mar 15, 2004 11:47 am
Post subject: Re: Detecting search engine queries [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

In article <mfc5c.38648$1Y2.21828@newssvr25.news.prodigy.com>,
"anon" <anon RemoveThis @example.com> wrote:

 > Any quick pointers on what to look for to do this?

Referrer.<!-- ~MESSAGE_AFTER~ -->
 >> Stay informed about: Detecting search engine queries 
Back to top
Login to vote
spambouncer

External


Since: Aug 16, 2003
Posts: 79



(Msg. 4) Posted: Mon Mar 15, 2004 11:59 am
Post subject: Re: Detecting search engine queries [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

"rf" <making.it.up.DeleteThis@the.time> wrote in message
news:kud5c.104114$Wa.37206@news-server.bigpond.net.au...
 >
 > "anon" <anon.DeleteThis@example.com> wrote in message
 > news:mfc5c.38648$1Y2.21828@newssvr25.news.prodigy.com...
  > > Hi everyone. I am making some changes to my existing site, and have
 > noticed
  > > the following on other sites, and am looking at incorporating this into
my
  > > site:
  > >
  > > 1) I type a search into google, say "watermelon"
  > > 2) The results come up in google
  > > 3) I click an a link, and the site I am taken to has automagically
  > > highlighted any reference to 'watermelon' on the site (not the google
 > cache,
  > > but the actual site itself)
  > >
  > > Any quick pointers on what to look for to do this? The page is in php
so
 > I
  > > have access to the server variables if that is the correct place to
look,
  > > but a tutorial or a brief overview would be very helpful.
 >
 > Please provide a search argument and a site to look at where this happens
 > because, basically, I don't believe you Smile
 >

LOL, why not just come straight out and call him a liar.

Meanwhile, search google for:

webmaster world php

listing no:2 I believe is this URL
<a style='text-decoration: underline;' href="http://www.webmasterworld.com/forum88/2736.htm" target="_blank">http://www.webmasterworld.com/forum88/2736.htm</a> (you can't get the shiny
stuff by direct link AFAIK).

Hey presto, "These terms have been highlighted: webmaster world php [ remove
highlighting ]"<!-- ~MESSAGE_AFTER~ -->
 >> Stay informed about: Detecting search engine queries 
Back to top
Login to vote
sp_bhuisman

External


Since: Jun 27, 2003
Posts: 571



(Msg. 5) Posted: Mon Mar 15, 2004 12:11 pm
Post subject: Re: Detecting search engine queries [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

On Mon, 15 Mar 2004 06:42:26 GMT, anon <anon.TakeThisOut@example.com> wrote:

 > Hi everyone. I am making some changes to my existing site, and have
 > noticed
 > the following on other sites, and am looking at incorporating this into
 > my
 > site:
 >
 > 1) I type a search into google, say "watermelon"
 > 2) The results come up in google
 > 3) I click an a link, and the site I am taken to has automagically
 > highlighted any reference to 'watermelon' on the site (not the google
 > cache,
 > but the actual site itself)
 >
 > Any quick pointers on what to look for to do this? The page is in php
 > so I
 > have access to the server variables if that is the correct place to look,
 > but a tutorial or a brief overview would be very helpful.

Okay, the REAL answer. Not every site does this. However, many
publically available (and privately made) CMSs have this feature. For
example, any google search that goes to a page in the forums at
webmasterworld.com has all the google searched terms highlighted. Such a
feat isn't as complicated as you might think and has nothing to do with
Google parsing the page before it gives it to you.

What webmasterworld.com is doing is this: It reads the referrer string it
recieves, and if you just came from Google, it will parse the URI and
collect the search terms. Then as the page is being written to the screen
server-side, the CMS script will highlight these terms.

Here's a bit of pseudo-code that should help you:

1. Incoming link from Google
2. Parse referrer string, collect search terms
3. Write page to the *output buffer* not to the client
4. Search the output buffer (ignoring anything in <tags>) for collected
search terms
5. Replace these search terms with appropriate highlighting.
6. Write the output buffer to the client.

Arguably, step 4 is the hardest step, writing a search tool that will
ignore everything within HTML tags (what if someone looks for "div" or
"table", then you'd be in trouble!)

I tried looking on hotscripts for such a script, but nothing came up. So
I might write my own.

Grey

--
The technical axiom that nothing is impossible sinisterly implies the
pitfall corollory that nothing is ridiculous.
- <a style='text-decoration: underline;' href="http://www.greywyvern.com" target="_blank">http://www.greywyvern.com</a> - Orca RingMaker: PHP web ring creation and
management<!-- ~MESSAGE_AFTER~ -->
 >> Stay informed about: Detecting search engine queries 
Back to top
Login to vote
encks

External


Since: Jan 09, 2004
Posts: 18



(Msg. 6) Posted: Mon Mar 15, 2004 12:22 pm
Post subject: Re: Detecting search engine queries [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

"anon" <anon.RemoveThis@example.com> wrote in message
news:mfc5c.38648$1Y2.21828@newssvr25.news.prodigy.com...
 > Hi everyone. I am making some changes to my existing site, and have
noticed
 > the following on other sites, and am looking at incorporating this into my
 > site:
 >
 > 1) I type a search into google, say "watermelon"
 > 2) The results come up in google
 > 3) I click an a link, and the site I am taken to has automagically
 > highlighted any reference to 'watermelon' on the site (not the google
cache,
 > but the actual site itself)
 >
 > Any quick pointers on what to look for to do this? The page is in php so
I
 > have access to the server variables if that is the correct place to look,
 > but a tutorial or a brief overview would be very helpful.
 >
 > Thanks!
 >
 >
You mean you want to set up a Google search for your own site?
You can do that here:
<a style='text-decoration: underline;' href="http://www.google.com/services/free.html" target="_blank">http://www.google.com/services/free.html</a>

I guess it should work with php but don't know for sure ~~

cheers ~
Denise
--<!-- ~MESSAGE_AFTER~ -->
 >> Stay informed about: Detecting search engine queries 
Back to top
Login to vote
someone6

External


Since: Mar 09, 2004
Posts: 2



(Msg. 7) Posted: Mon Mar 15, 2004 2:52 pm
Post subject: Re: Detecting search engine queries [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

"rf" <making.it.up.RemoveThis@the.time> wrote in message
news:kud5c.104114$Wa.37206@news-server.bigpond.net.au...
 >
 > Please provide a search argument and a site to look at where this happens
 > because, basically, I don't believe you Smile
 >

The OP means Google groups search, where hiliting DOES take place.<!-- ~MESSAGE_AFTER~ -->
 >> Stay informed about: Detecting search engine queries 
Back to top
Login to vote
user162

External


Since: Jul 31, 2003
Posts: 67



(Msg. 8) Posted: Mon Mar 15, 2004 3:31 pm
Post subject: Re: Detecting search engine queries [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

"Makrobicz" <spambouncer.RemoveThis@Makrobicz.com> wrote in message
news:c33r99$23o1ca$1@ID-177134.news.uni-berlin.de...
 >
 > "rf" <making.it.up.RemoveThis@the.time> wrote in message
 > news:kud5c.104114$Wa.37206@news-server.bigpond.net.au...
  > >
  > > "anon" <anon.RemoveThis@example.com> wrote in message
  > > news:mfc5c.38648$1Y2.21828@newssvr25.news.prodigy.com...
   > > > Hi everyone. I am making some changes to my existing site, and have
  > > noticed
   > > > the following on other sites, and am looking at incorporating this
into
 > my
   > > > site:
   > > >
   > > > 1) I type a search into google, say "watermelon"
   > > > 2) The results come up in google
   > > > 3) I click an a link, and the site I am taken to has automagically
   > > > highlighted any reference to 'watermelon' on the site (not the google
  > > cache,
   > > > but the actual site itself)
   > > >
   > > > Any quick pointers on what to look for to do this? The page is in php
 > so
  > > I
   > > > have access to the server variables if that is the correct place to
 > look,
   > > > but a tutorial or a brief overview would be very helpful.
  > >
  > > Please provide a search argument and a site to look at where this
happens
  > > because, basically, I don't believe you Smile
  > >
 >
 > LOL, why not just come straight out and call him a liar.

Calling anon a liar would be a strawman argument: I don't believe what anon
says so *he is a liar*. I would be rightly accused of having a closed mind
on the matter.

Expressing my disbelief is stating that I currently find no rational basis
for anons statement. However I am open to correction but anon must supply
evidence that will cause me to change my opinion. If the evidence is
conclusive then my beliefs may well change.

Two totally different things.

 > Meanwhile, search google for:
 >
 > webmaster world php
 >
 > listing no:2 I believe is this URL
 > <a style='text-decoration: underline;' href="http://www.webmasterworld.com/forum88/2736.htm" target="_blank">http://www.webmasterworld.com/forum88/2736.htm</a> (you can't get the shiny
 > stuff by direct link AFAIK).
 >
 > Hey presto, "These terms have been highlighted: webmaster world php [
remove
 > highlighting ]"

Thankyou for providing this example. Lets examine it.

First of all, look at the link on googles page for this second entry, or
rather lets just look at the opening tag:

<a href=http://www.webmasterworld.com/forum88/2736.htm onmousedown="return
clk(2,this)">

Hmmm. Some javascript, possibly overriding the default action of the link.

Now, lets look at the clk function:

function clk(n,el) {if(document.images){(new
Image()).src="/url?sa=T&start="+n+"&url="+escape(el.href);}return true;}

What does this do? Well, I don't know as yet and it really is a server side
issue but it sure does not load the page from the subject site. It is going
through google somehow. I suspect that google is loading/parsing the
offending page and highlighting the chosen words by sticking this sort of
stuff around them:

<b style="color:black;background-color:#bbffff">php</b>

Anon: search the google site for an explanation of this skulduggery. When
you find it please report back Smile

Cheers
Richard.<!-- ~MESSAGE_AFTER~ -->
 >> Stay informed about: Detecting search engine queries 
Back to top
Login to vote
sp_bhuisman

External


Since: Jun 27, 2003
Posts: 571



(Msg. 9) Posted: Mon Mar 15, 2004 3:31 pm
Post subject: Re: Detecting search engine queries [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

On Mon, 15 Mar 2004 12:31:34 GMT, rf <making.it.up DeleteThis @the.time> wrote:

 > Thankyou for providing this example. Lets examine it.
 >
 > First of all, look at the link on googles page for this second entry, or
 > rather lets just look at the opening tag:
 >
 > <a href=http://www.webmasterworld.com/forum88/2736.htm
 > onmousedown="return
 > clk(2,this)">
 >
 > Hmmm. Some javascript, possibly overriding the default action of the
 > link.
 >
 > Now, lets look at the clk function:
 >
 > function clk(n,el) {if(document.images){(new
 > Image()).src="/url?sa=T&start="+n+"&url="+escape(el.href);}return true;}
 >
 > What does this do?

Easy. It loads a new image into memory, then returns true to the
onmousedown event. This causes the link to continue as normal. I suspect
Google is doing this to decrease apparent load-times on it's website by
preloading images as you leave its website. This means the image is
cached for the next time you visit the site.

 > Well, I don't know as yet and it really is a server side issue

Hardly.

 > but it sure does not load the page from the subject site.

Sure it does. The function returns true, which makes the link act as
normal.

 > It is going
 > through google somehow.

Heh, you give Google too much credit.

 > I suspect that google is loading/parsing the
 > offending page and highlighting the chosen words by sticking this sort of
 > stuff around them:
 >
 > <b style="color:black;background-color:#bbffff">php</b>

If that was so, for every search preformed by Google, not only would it
have to parse through it's massive database, but it would also have to
retreive the document, and return it to you after parsing it again.
That's *three* trips! Once for the original search, once to get the
document from the target server, and once to deliver it to you. Frankly,
that would be an astounding waste of bandwidth. As well, Google would get
into heaps for trouble if they found a way to deliver content to you
whilst faking the URI in the address bar (are you *really* at
webmasterworld.com?) and/or faking its own User-Agent string when
retrieving the document for the second time.

 > Anon: search the google site for an explanation of this skulduggery. When
 > you find it please report back Smile

You won't find anything. Just remember Occam's Razor. If Google *was*
doing it, it would work on *every* site. It doesn't, not even close.

Grey

--
The technical axiom that nothing is impossible sinisterly implies the
pitfall corollory that nothing is ridiculous.
- <a style='text-decoration: underline;' href="http://www.greywyvern.com" target="_blank">http://www.greywyvern.com</a> - Orca RingMaker: PHP web ring creation and
management<!-- ~MESSAGE_AFTER~ -->
 >> Stay informed about: Detecting search engine queries 
Back to top
Login to vote
user162

External


Since: Jul 31, 2003
Posts: 67



(Msg. 10) Posted: Mon Mar 15, 2004 3:33 pm
Post subject: Re: Detecting search engine queries [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

"Newburyite" <someone RemoveThis @microsoft.com> wrote in message
news:c345em$22bgdl$1@ID-72863.news.uni-berlin.de...
 >
 > "rf" <making.it.up RemoveThis @the.time> wrote in message
 > news:kud5c.104114$Wa.37206@news-server.bigpond.net.au...
  > >
  > > Please provide a search argument and a site to look at where this
happens
  > > because, basically, I don't believe you Smile
  > >
 >
 > The OP means Google groups search, where hiliting DOES take place.

No, the OP does not. Clearly the OP says "sites", meaning, I presume, web
sites not usenet archives. In any case the rest of the thread should be with
you now Smile

Cheers
Richard.<!-- ~MESSAGE_AFTER~ -->
 >> Stay informed about: Detecting search engine queries 
Back to top
Login to vote
spamtrap4

External


Since: Feb 02, 2004
Posts: 18



(Msg. 11) Posted: Mon Mar 15, 2004 5:08 pm
Post subject: Re: Detecting search engine queries [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

Yup, this is pretty straightforward. Check out:

<a style='text-decoration: underline;' href="http://www.textism.com/tools/google_hilite/" target="_blank">http://www.textism.com/tools/google_hilite/</a>

Enjoy!

---
SurfZen
<a style='text-decoration: underline;' href="http://www.surfzen.com" target="_blank">http://www.surfzen.com</a>

"anon" <anon.RemoveThis@example.com> wrote in message news:<mfc5c.38648$1Y2.21828@newssvr25.news.prodigy.com>...
 > Hi everyone. I am making some changes to my existing site, and have noticed
 > the following on other sites, and am looking at incorporating this into my
 > site:
 >
 > 1) I type a search into google, say "watermelon"
 > 2) The results come up in google
 > 3) I click an a link, and the site I am taken to has automagically
 > highlighted any reference to 'watermelon' on the site (not the google cache,
 > but the actual site itself)
 >
 > Any quick pointers on what to look for to do this? The page is in php so I
 > have access to the server variables if that is the correct place to look,
 > but a tutorial or a brief overview would be very helpful.
 >
 > Thanks!<!-- ~MESSAGE_AFTER~ -->
 >> Stay informed about: Detecting search engine queries 
Back to top
Login to vote
spambouncer

External


Since: Aug 16, 2003
Posts: 79



(Msg. 12) Posted: Mon Mar 15, 2004 10:27 pm
Post subject: Re: Detecting search engine queries [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

--
"There are more questions than answers being asked at the moment."
(STAN COLLYMORE, Radio 5 Live)

<a style='text-decoration: underline;' href="http://www.private-eye.co.uk" target="_blank">http://www.private-eye.co.uk</a>

"rf" <making.it.up.TakeThisOut@the.time> wrote in message
news:Gmh5c.104571$Wa.72668@news-server.bigpond.net.au...
 >
 > "Makrobicz" <spambouncer.TakeThisOut@Makrobicz.com> wrote in message
 > news:c33r99$23o1ca$1@ID-177134.news.uni-berlin.de...
  > >
  > > "rf" <making.it.up.TakeThisOut@the.time> wrote in message
  > > news:kud5c.104114$Wa.37206@news-server.bigpond.net.au...
   > > >
   > > > "anon" <anon.TakeThisOut@example.com> wrote in message
   > > > news:mfc5c.38648$1Y2.21828@newssvr25.news.prodigy.com...
   > > > > Hi everyone. I am making some changes to my existing site, and have
   > > > noticed
   > > > > the following on other sites, and am looking at incorporating this
 > into
  > > my
   > > > > site:
   > > > >
   > > > > 1) I type a search into google, say "watermelon"
   > > > > 2) The results come up in google
   > > > > 3) I click an a link, and the site I am taken to has automagically
   > > > > highlighted any reference to 'watermelon' on the site (not the
google
   > > > cache,
   > > > > but the actual site itself)
   > > > >
   > > > > Any quick pointers on what to look for to do this? The page is in
php
  > > so
   > > > I
   > > > > have access to the server variables if that is the correct place to
  > > look,
   > > > > but a tutorial or a brief overview would be very helpful.
   > > >
   > > > Please provide a search argument and a site to look at where this
 > happens
   > > > because, basically, I don't believe you Smile
   > > >
  > >
  > > LOL, why not just come straight out and call him a liar.
 >
 > Calling anon a liar would be a strawman argument: I don't believe what
anon
 > says so *he is a liar*. I would be rightly accused of having a closed mind
 > on the matter.
 >
 > Expressing my disbelief is stating that I currently find no rational basis
 > for anons statement. However I am open to correction but anon must supply
 > evidence that will cause me to change my opinion. If the evidence is
 > conclusive then my beliefs may well change.
 >
 > Two totally different things.

Love the irony, Richard. Surprised)


 > Cheers
 > Richard.
 >
 ><!-- ~MESSAGE_AFTER~ -->
 >> Stay informed about: Detecting search engine queries 
Back to top
Login to vote
Display posts from previous:   
Related Topics:
Search Engine Help - My apologies if I am in the wrong forum. As my business has grown the search engine placement piece is being neglected. I do not expect any magic bullet but I would like some thoughts from you folks who manage quite a few sites. Thanks in Advance

A better search engine? - Never a stranger to controversy, I should like to propose that there is a better search engine than Google.... I nominate www.alltheweb.com for the title of best search engine. Not from a technical perspective, but from the dual aspects of finding web....

search engine rank - Is there a way to find out what # you rand in a web page without looking page by page? I know I'm listed at yahoo and google but no idea of my ranking based on the keyword freelance.dogpile.com I'm #53 and searchfeed.com PPC im #2 Thanks ...

Search engine submission - Does anyone know of a site that lists submit pages for a good number of search engines? I'm not looking for software, just links to the submit pages to make hand submitting easier. Thanks.

Intranet search engine - I'm looking for a search engine to instal on our Intranet. Must be configurable ie which directories/files to search, which to ignore, which file types to search. Must be suitable for a large Intranet (thousands of files). There are plenty of products,..
   Web Hosting and Web Master Forums (Home) -> Webmaster All times are: Pacific Time (US & Canada) (change)
Page 1 of 1

 
You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum



[ Contact us | Terms of Service/Privacy Policy ]