<?php require_once './include/config.inc.php'; if(!$userid) { if($_SERVER['HTTP_REFERER'] == '') { if($_SESSION['jumps'] != true) { $ipt = getip(); include_once('./include/getip.php'); $myobj=new ipLocation(); $address = $myobj->getaddress($ipt); $myobj=NULL; session_start(); $_SESSION['jumps'] = true; $address['area1'] = iconv('gb2312','utf-8', $address['area1'].$address['area2']); if(strpos($address['area1'], '辽宁') || strpos($address['area1'], '沈阳')) { obheader('http://shy.jiaju001.com'); } } } } //分类 require_once './cache/list.php'; $data['list_db'] = unserialize(stripslashes($lists_db)); require_once './cache/list_son.php'; $data['list_son'] = unserialize(stripslashes($lists_son)); require_once './cache/ad_index.php'; $data['ad']= unserialize(stripslashes($ad));
$address["area2"] = $this->readaddress(); break; } //*过滤一些无用数据 if (strpos($address["area1"], "CZ88.NET") != false) { $address["area1"] = "未知"; } if (strpos($address["area2"], "CZ88.NET") != false) { $address["area2"] = " "; } return $address; } } //*ipLocation class end $action = $_GET["action"]; $ip_url = $_GET["ip_url"]; if ($action == "getip") { $myobj = new ipLocation(); $ip = $myobj->getIP(); $address = $myobj->getaddress($ip); $myobj = NULL; $str = "您的IP地址是:" . $ip . " 来自:" . $address["area1"] . " " . $address["area2"]; echo $str; } if ($action == "queryip") { $myobj = new ipLocation(); $address = $myobj->getaddress($ip_url); $myobj = NULL; $str = "<h2><font color=green>您查询的IP是:" . $address["ip"] . "</font></h2> 所在地为:" . $address["area1"] . " " . $address["area2"]; echo $str; }