Home >Backend Development >PHP Tutorial >PHP method to obtain Google robot access footprints, google robot_PHP tutorial

PHP method to obtain Google robot access footprints, google robot_PHP tutorial

WBOY
WBOYOriginal
2016-07-13 09:57:071012browse

How to get Google robot’s access footprint in php, google robot

This article describes the method of php’s getting Google robot’s access footprint. Share it with everyone for your reference. The details are as follows:

<&#63;php
$email = "test@test.com";
if(eregi("googlebot",$HTTP_USER_AGENT))
{
 if ($QUERY_STRING != "")
 {
  $url = "http://".$SERVER_NAME.$PHP_SELF.'&#63;'.$QUERY_STRING;
 } else {
  $url = "http://".$SERVER_NAME.$PHP_SELF;
 }
 $date = date("F j, Y, g:i a");
 mail($email,"[Googlebot] $url","$date - Google crawled $url");
}
&#63;>

I hope this article will be helpful to everyone’s PHP programming design.

www.bkjia.comtruehttp: //www.bkjia.com/PHPjc/984625.htmlTechArticleHow to get the Google robot’s access footprint in php, google robot. This article describes the method of php to get the Google robot’s access footprint. Share it with everyone for your reference. The details are as follows:...
Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn