绿色榕树
忆江南
业余无线电
UID:2 管理员
$getUrl = 'https://ip.tool.chinaz.com/'.$zaixianip;$curl = curl_init(); // 初始化curlcurl_setopt($curl, CURLOPT_SSL_VERIFYPEER, false); // 跳过证书检查curl_setopt($curl, CURLOPT_SSL_VERIFYHOST, 2); // 从证书中检查SSL加密算法是否存在curl_setopt($curl, CURLOPT_URL, $getUrl); // 抓取指定网页curl_setopt($curl, CURLOPT_RETURNTRANSFER, true); // curl不直接输出到屏幕curl_setopt($curl, CURLOPT_HEADER, 0); // 设置header$data = curl_exec($curl); // 运行curlcurl_close($curl);$begin=strpos($data,'IP:');$end=$begin+100;$str=substr($data,$begin,$end);//截取页面$encode = mb_detect_encoding($str, array('ASCII','UTF-8','GB2312','GBK','BIG5'));$string =mb_convert_encoding($str,'GBK',$encode);//使用iconv函数转码在空间论坛无效$begin2=strpos($string,'ipAddress');$end2=$begin2+100;$str2=substr($string,$begin2,$end2);//再次截取页面$str3=explode('>',$str2);$str4=explode('<',trim($str3[1]));$wulidizhi=trim($str4[0]);
<?phprequire_once ('../global.php');//保存在一级子目录用这行//include_once (R_P.'/require/common.php');global $winduid,$onlineip,$ip;$ip='112.38.51.112';echo getipguishu($ip);?>
return $getUrl;
图片:快照10.jpg
zhangjingyu 看了下包含“ipfrom”的文件,(如果需要处理ip归属)主要的应该是下面4个:require/postmodify.php pw_tmsgslib/forum/topicpost.class.php pw_tmsgslib/forum/replypost.class.php pw_postslib/forum/postmodify.class.php pw_posts (2025-12-07 20:45) 查看本帖