In particular, it is impossible to know which spider has accessed this site, the frequency of access, the page, and General website statistics.
Although I know little about PHP, but with the development experience of. NET, Baidu is still very quick to complete, although simple, everyone does not laugh.
Copy codeThe Code is as follows:
// Insert the SHOPEX homepage index. php code block
// Viewing the variables in PHP is actually quite simple.
// Use a function phpinfo () to view
$ 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 );