您的位置:宽带测速网 > 帝国cms > 帝国CMS调用新浪iplookup实现根据ip跳转到不同域名

帝国CMS调用新浪iplookup实现根据ip跳转到不同域名

2025-08-20 10:17来源:互联网 [ ]

帝国CMS调用新浪iplookup实现根据ip跳转到不同域名的方法。分享给大家供大家参考。

具体实现代码:

?

代码:
$IP_str=file_get_contents('int.dpool.sina../iplookup/iplookup.php');?
$IP_tmp = explode("n", $IP_str);?
$IPcou=count($IP_tmp)-1;?
$IP_tmp1 = explode(" ", $IP_tmp[0]);?
if($IP_tmp1[5]){?
$user_IP=$IP_tmp1[5];?
}else{?
$user_IP=$IP_tmp1[4];?
}
if($user_IP == '上海'){?
header('Location: A.php');?
}elseif($user_IP == '北京'){?
header('Location: B.php');?
}else{
header('Location: C.php');?
}

?

猜您喜欢的源码利用jQuery实现点击阅读全文查看文章代码

利用jQuery实现 点击阅读 全文查看 文章代码。利用jQuery实现点击阅读全文查看文章代码