找回密码
 免费注册

[API分享] 搜狐IP地址查询接口

[复制链接]
admin 发表于 2024-2-1 16:03:00 | 显示全部楼层 |阅读模式
  1. http://txt.go.sohu.com/ip/soip
复制代码
  1. String.prototype.getQueryString=function(v){var reg=new RegExp("(^|&|\\?)" + v + "=([^&]*)(&|$)"), r;if(r=this.match(reg)){return unescape(r[2]);}return null;};var sohu_IP_Loc="unknown",LocUrl=document.location.href;if((LocUrl.indexOf("sohusce.com") >= 0)||(LocUrl.indexOf("sohu.com") >= 0)||(LocUrl.indexOf("chinaren.com") >= 0)||(LocUrl.indexOf("17173.com") >= 0)||(LocUrl.indexOf("focus.cn") >= 0)){window.sohu_user_ip="113.249.42.33";sohu_IP_Loc="CN500000";sohu_IP_Loc_V="CN500000";}var AdLoc2=sohu_IP_Loc.substr(0,2),AdLoc4=sohu_IP_Loc.substr(0,4),AdLoc6=sohu_IP_Loc.substr(0,6);if(window.location.href.getQueryString("ip"))sohu_IP_Loc=AdLoc2=AdLoc4=AdLoc6=window.location.href.getQueryString("ip");
复制代码


回复

使用道具 举报

您需要登录后才可以回帖 登录 | 免费注册

本版积分规则

QQ|Archiver|手机版|小黑屋|信息共享网

GMT+8, 2024-5-15 08:21 , Processed in 0.066635 second(s), 18 queries .

Powered by Discuz! X3.5

© 2001-2024 Discuz! Team.

快速回复 返回顶部 返回列表