首先复制如下代码:
<?php $ip=$_SERVER['REMOTE_ADDR']; $time=date("Y-m-d H:i:s"); $file=fopen("ip.txt","a+"); fwrite($file,str_pad($ip,15," ",1)." ".$time."\n"); fclose($file); ?>
接着我们在 主机中 建立index.php 主页,用户访问 index.php 那么会在网站根目录内 IP.TXT 显示用户的IP信息 以及多会儿点击的!这个方法直接就能抓到用户IP。
Comments | NOTHING
该文章已经关闭评论