摘要:
1、获取浏览者的ip地址及所在城市的代码首先是获取浏览者的ip地址的函数functiongetRealIp(){if(!emptyempty($_SERVER['HTTP_CLIENT_IP'])){//checkipfromshareinternet$ip=$_SERVER['HTTP_CLIENT_IP'];}elseif(!emptyempty($_SERVER['HTTP_X_FORWARDED_FOR'])){//tocheckipispassfromproxy$ip=$_SERVER['HTTP_X_FORWARDED_FOR 阅读全文