做爲一個phper,爲了根據ip地址獲取客戶的具體省市區,我也是拼了,找了好幾個文檔,終於找到了php
Code for PHP 5.3+ only!
下載地址: https://www.ipip.net/free_download/
https://github.com/17mon/php
*/git
創建測試腳本:爲初學者提供:
include_once('IP.class.php');github
echo "<pre>";
print_r(IP::find('178.159.37.105'));測試
print_r(IP::find($_SERVER['REMOTE_ADDR']));.net
echo "</pre>";
echo '<br>也多是:'.join('',IP::find($ip));ip