Especially knowing which spiders have visited this site, the frequency of visits, pages, and ordinary site statistics cannot be solved.
Although I know very little about PHP, with the development experience of .NET and the help of Baidu, I still completed it quickly. Although it is simple, don’t laugh.
Copy the code The code is as follows:
// Insert into the index.php code block on the SHOPEX homepage
/ / Checking variables in PHP is actually quite simple
// Using a function phpinfo() is enough to check
$fp = fopen("log.txt","a+");
fwrite($fp, date("Y-m-d H:i:s"));
fwrite($fp,"t");
fwrite($fp,$_SERVER['REMOTE_ADDR']);
fwrite($fp ,"t");
fwrite($fp,$_SERVER['HTTP_X_REWRITE_URL']);
fwrite($fp,"t");
fwrite($fp,$_SERVER['HTTP_USER_AGENT' ]);
fwrite($fp,"t");
fwrite($fp,$_SERVER["HTTP_REFERER"]);
fwrite($fp,"n");
fclose ($fp);
http://www.bkjia.com/PHPjc/322111.htmlwww.bkjia.comtruehttp: //www.bkjia.com/PHPjc/322111.htmlTechArticleEspecially like knowing which spiders have visited this site, the frequency of visits, pages, and general site statistics. It cannot be solved. Although I know very little about PHP, with the development of .NET...