Just look at the demo and see a very interesting place to Record.
$zz _page=$_server[' Request_uri '];$zz _name=$_server[' Http_user_agent '];$zz _ip=$_server[' http_x_forwarded_for ']; Echo $zz _name;Ini_set("date.timezone", "PRC");$zzdatetime=Date("y-m-d h:i:s");$baidu=Stristr($zz _name, "baiduspider");$so=Stristr($zz _name, "360Spider");$sogou=Stristr($zz _name, "Sogou Web spider");if($baidu){ $zz _names= "baidu";}ElseIf($sogou){ $zz _names= "sogou";}ElseIf($so){ $zz _names= "360 search";}Else{ $zz _names=NULL;}if($zz _names!=NULL){ $zzsql= "insert into dunling_robots (zznames,page,datetime) values ('$zz _names‘,‘$zz _page‘,‘$zzdatetime‘)"; mysql_query($zzsql,$config);}
Very simple small code, you can save the search engine crawled down the path and other information, if the place can perform the screening, to the webmaster want to statistics traffic is very effective.
It can be referenced in a single PHP file or inserted directly into the Page.
PHP captures User IP address time and access path from the search engine