The PHP file records the visitor's IP address instance code. The PHP file records the visitor's IP address instance code. the code is very small and can be run in the PHP environment. hope to help people who need it .? Php?fpfopen(log.txt, a); fwrite ($ fp, date (Y-m-dH php file records the visitor's IP instance code, the code is very small, can be run in the PHP environment, hope to help people in need.
-
- $ Fp = fopen ("log.txt", "");
- 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 files record visitor IP instance code, code is very few, can run in PHP environment, hope to help people in need. ? Php $ fp = fopen ("log.txt", "a"); fwrite ($ fp, date ("Y-m-d H...