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

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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

Link to comment
Share on other sites

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)

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.