标题: 统计ip的源码是什么????
时间: 2012-10-14
『回复列表(11|显示机器人聊天)』
<?php
$ip=$_SERVER["REMOTE_ADDR"];
$db=file_get_contents ("http://wap.ip150.com/index.php?btnG=ip&word={$ip}");
$db=explode('是',$db);
$db=explode('<br/>',$db[1]);
$db=explode(' ',$db[0]);
echo '你的ip是'.$ip.'<br/>你来自'.$db[1].'';
$name="IP.txt";
$pp="★$ip★";
$file=fopen($name,"a ");
fwrite($file,$pp);
fclose($file);
?>
被写入IP.txt<?php
$ip=$_SERVER["REMOTE_ADDR"];
$db=file_get_contents ("http://wap.ip150.com/index.php?btnG=ip&word={$ip}");
$db=explode('是',$db);
$db=explode('<br/>',$db[1]);
$db=explode(' ',$db[0]);
echo '你的ip是'.$ip.'<br/>你来自'.$db[1].'';
$name="IP.txt";
$pp="★'.$ip.'★";
$file=fopen($name,"a ");
fwrite($file,$pp);
fclose($file);
?>
被写入IP.txt