有些内置的函数无法获取用户客户端真是的ip地址,而在实际运用中,我们这个用到的相对来说还是比较频繁的,那么有什么方法来解决这个呢?答案就在下方!function getipinfo(){<br>
header("Content-Type:text/html; charset=utf-8");<br>
$url = 'http://1111.ip138.com/ic.asp'; //这儿填页面地址<br>
$info=httpGet($url);<br>
$p = "%<center>(.*?)</center>%si";<br>
preg_match_all($p, $info, $arr);<br>
<br>
$info=$arr[1];<br>
$str1 = explode("[",iconv('GB2312', 'UTF-8',$info[0]));<br>
$str2 = explode("]",$str1[1]);<br>
$ip=$str2[0].'_'.substr($str2[1],10);<br>
return $ip;<br>
}
原文来自:http://www.580bang.com/?post=2
AD:真正免费,域名+虚机+企业邮箱=0元

Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

Video Face Swap
Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Article

Hot Tools

Dreamweaver CS6
Visual web development tools

Notepad++7.3.1
Easy-to-use and free code editor

SublimeText3 Linux new version
SublimeText3 Linux latest version

MantisBT
Mantis is an easy-to-deploy web-based defect tracking tool designed to aid in product defect tracking. It requires PHP, MySQL and a web server. Check out our demo and hosting services.

SublimeText3 Chinese version
Chinese version, very easy to use
