I am trying to figure out if my site traffic is from a search engine or a referrer. What parameters do search engines pass? This is untest code to give you guys an idea of what I am trying to do. $se_array = array(google.com, msn.com, yahoo.com, bing.com, altavista.com); foreach ($se_array as $se_name) { $se_found = preg_grep($se_name, $_REQUEST); if($se_found){ //Do what I want to do to search engine traffic } } else { // Do what I want to do with referrer traffic } PHP:
$_SERVER['HTTP_USER_AGENT']; PHP: You'll have to research this one. Google calls itself Googlebot, Yahoo! is Slurp, etc. They all come up with creative names to impress themselves. Here is a quick snippet to get you on your way: http://stackoverflow.com/questions/1154420/how-to-detect-search-engine-visites-on-my-site-like-phpbb
I don't care about bots. Does google initilize the HTTP_USER_AGENT variable when sending, search engine traffic to a site?
Why dont you use google analytics ? It will give all the details as you need and also more than what you expect.
What? Isn't that what you asked for, when a search engine is visiting your site? Please be more specific.
I do use Google Analytics for tracking my website statistics. The data I am trying to get cam be used for more than statistics tracking I am going to use this data for more than that too. I really mean this, thanks for the info. If it was, then you need to listen to what I am thinking and not to what I said. I am trying to find out if my traffic was sent from a search engine (organic traffic) or one of my referrers(referral traffic). I will show different pages to organic traffic than I show to referral traffic. I certainly could have worded my question better, than I did in the OP. Does Google, Yahoo, MSN, Bing and the other top rated search engines label it's organic traffic so I can distinguish between the organic and referral traffic.