⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 ipdata.asp

📁 玛雅自助导航系统 玛雅自助导航系统 玛雅自助导航系统
💻 ASP
字号:
<%
On Error Resume Next
Server.ScriptTimeOut=9999999
Function getHTTPPage(url,Input_) 
    dim Http 
	set Http=server.createobject("Microsoft.XMLHTTP") 
	Http.Open "POST",url,False,"", ""
	Http.SetRequestHeader "CONTENT-TYPE","application/x-www-form-urlencoded"
	Http.Send(Input_) 
	if Http.readystate<>4 then 
	exit function 
	end if 
	getHTTPPage=bytesToBSTR(Http.responseBody,"utf-8") 'utf-8,GB2312
	set http=nothing 
	if err.number<>0 then err.Clear 
End Function
 
Function BytesToBstr(body,Cset) 
    dim objstream 
	set objstream = Server.CreateObject("adodb.stream") 
	objstream.Type = 1 
	objstream.Mode =3 
	objstream.Open 
	objstream.Write body 
	objstream.Position = 0 
	objstream.Type = 2 
	objstream.Charset = Cset 
	BytesToBstr = objstream.ReadText 
	objstream.Close 
	set objstream = nothing 
End Function 

Function Country(Str)
     Url="http://wap.ip138.com/ip.asp"
	 Input_="ip="&Str&""
	 wstr=getHTTPPage(url,Input_) 
	 start=Instr(wstr,":")+1
	 over=Instr(wstr,"</b><br/>")
	 body=mid(wstr,start,over-start)
	 Country = body
End Function 
%>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -