相比用一些地址字典好很多,毕竟自己的字典不可能经常更新
通过ip138获取ip真实地址/* <br>
$pro 使用(sina,ip138)可选 <br>
*/ <br>
public function get_ip_address($ip,$pro='ip138') <br>
{ <br>
$ip_address = ''; <br>
if($ip == '127.0.0.1') <br>
{ <br>
$ip_address = '本机 127.0.0.1'; <br>
}else if($pro=='ip138') <br>
{ <br>
<br>
$url = 'http://www.ip138.com/ips138.asp?ip='.$ip; <br>
$content = file_get_contents($url ); <br>
preg_match("/<ul><li>[\s|\S]*?/",$content,$matches); <br>
$ip_address = iconv('gbk','utf-8',$matches[0]); <br>
<br>
}else <br>
{ <br>
$url = 'http://int.dpool.sina.com.cn/iplookup/iplookup.php?format=js&ip='.$ip; <br>
$content = file_get_contents($url ); <br>
$content = str_replace('var remote_ip_info =', '', $content); <br>
$content = rtrim($content,';'); <br>
$content = trim($content); <br>
$content = json_decode($content,true); <br>
if($content) <br>
{ <br>
$ip_address = $content['country'].' '.$content['province'].' '.$content['city'].' '.$content['district'].' '.$content['isp'].' '.$content['type'].' '.$content['desc']; <br>
} <br>
<br>
} <br>
return $ip_address; <br>
} </li></ul>
转载注明:雷劈网
AD:真正免费,域名+虚机+企业邮箱=0元

Heiße KI -Werkzeuge

Undresser.AI Undress
KI-gestützte App zum Erstellen realistischer Aktfotos

AI Clothes Remover
Online-KI-Tool zum Entfernen von Kleidung aus Fotos.

Undress AI Tool
Ausziehbilder kostenlos

Clothoff.io
KI-Kleiderentferner

AI Hentai Generator
Erstellen Sie kostenlos Ai Hentai.

Heißer Artikel

Heiße Werkzeuge

MantisBT
Mantis ist ein einfach zu implementierendes webbasiertes Tool zur Fehlerverfolgung, das die Fehlerverfolgung von Produkten unterstützen soll. Es erfordert PHP, MySQL und einen Webserver. Schauen Sie sich unsere Demo- und Hosting-Services an.

MinGW – Minimalistisches GNU für Windows
Dieses Projekt wird derzeit auf osdn.net/projects/mingw migriert. Sie können uns dort weiterhin folgen. MinGW: Eine native Windows-Portierung der GNU Compiler Collection (GCC), frei verteilbare Importbibliotheken und Header-Dateien zum Erstellen nativer Windows-Anwendungen, einschließlich Erweiterungen der MSVC-Laufzeit zur Unterstützung der C99-Funktionalität. Die gesamte MinGW-Software kann auf 64-Bit-Windows-Plattformen ausgeführt werden.

ZendStudio 13.5.1 Mac
Leistungsstarke integrierte PHP-Entwicklungsumgebung

EditPlus chinesische Crack-Version
Geringe Größe, Syntaxhervorhebung, unterstützt keine Code-Eingabeaufforderungsfunktion

Senden Sie Studio 13.0.1
Leistungsstarke integrierte PHP-Entwicklungsumgebung