php 文件记录访问者IP实例代码 ,代码很少,在PHP环境里可以运行,希望可以帮助有需要的人。
- $fp = fopen("log.txt","a ");
- fwrite($fp,date("Y-m-d H:i:s"));
- fwrite($fp," ");
- fwrite($fp,$_SERVER[REMOTE_ADDR]);
- fwrite($fp," ");
- fwrite($fp,$_SERVER[HTTP_X_REWRITE_URL]);
- fwrite($fp," ");
- fwrite($fp,$_SERVER[HTTP_USER_AGENT]);
- fwrite($fp," ");
- fwrite($fp,$_SERVER["HTTP_REFERER"]);
- fwrite($fp,"
");
- fclose($fp);
- ?>
-
http://www.bkjia.com/PHPjc/486190.htmlwww.bkjia.comtruehttp://www.bkjia.com/PHPjc/486190.htmlTechArticlephp 文件记录访问者IP实例代码 ,代码很少,在PHP环境里可以运行,希望可以帮助有需要的人。 ?php $fp = fopen("log.txt","a "); fwrite($fp,date("Y-m-d H...