Jump to content

Qestion about google search result in websites


hno

Recommended Posts

 

HI,

I'm sure you have already experienced this:When you search in google and open some result you see that some of the sites has search  what exactly you search in google and show the result in his/her web page.This result can be exactly the google search result or the result from his/her website.How can make something like that.I want to have a search in my site which search what people search in google and That search in my site content and show the result from my content.

I'm apologize if my english in not good.

Thanks

You can use analytics such as Google Analytics (Free) or simply log the referrers from $_SERVER['HTTP_REFERRER']

 

The referrer may be: www.google.com/search?q=yoursite+foobar&hl=en .. Extract "q=yoursite+foobar" to get the keywords they entered in search to get to your site.

 

If that's what you wanted.

You can use analytics such as Google Analytics (Free) or simply log the referrers from $_SERVER['HTTP_REFERRER']

 

The referrer may be: www.google.com/search?q=yoursite+foobar&hl=en .. Extract "q=yoursite+foobar" to get the keywords they entered in search to get to your site.

 

If that's what you wanted.

Thanks for your reply,

But how can my website understand what does people has been searched in google?

What can $_SERVER['HTTP_REFERRER'] do for us?

 

Thanks

A referrer is what the client sends when pressing a link (usually with most browsers). If a user clicks on your website from a link in google (on google search), The referrer will be google.com/search?q=widgets for example.

 

If they searched 'widgets' in google, and clicked on your site, you know what they searched to get to your site (from the referrer)

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.