<% @LANGUAGE="VBSCRIPT" CODEPAGE="65001" %>
<%
    Response.ContentType = "text/vnd.wap.wml"
    Response.Write "<?xml version=""1.0"" encoding=""utf-8""?>"
    Response.Write "<!DOCTYPE wml PUBLIC ""-//WAPFORUM//DTD WML 1.1//EN"" ""http://www.wapforum.org/DTD/wml_1.1.xml"">"
    Response.Write "<wml>"
    Response.Write "<head>"
    Response.Write "<meta name=""keywords"" content=""程序开发龙门网SAYTK.COM"" />"
    Response.Write "<meta http-equiv=""Cache-Control"" content=""max-age=0""/>"
    Response.Write "<meta http-equiv=""Cache-Control"" content=""no-cache""/>"
    Response.Write "</head>"
    %><card title="IP地址查询"><p>
<%
Dim ip
sid=trim(Request.querystring("sid"))
saytk=trim(Request.querystring("saytk"))
ip=trim(Request.querystring("ipaddr"))
        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 
'---------------------------------------
Dim Url,start,over,body,wstr,str,Input_
Url="http://wap.ip138.com/ip.asp"
Input_="ip="&request("ipaddr")&""
wstr=getHTTPPage(url,Input_) 
start=Instr(wstr,"<p>")+3
over=Instr(wstr,"(c)2003-06 wap.ip138.com<br/>")
body=mid(wstr,start,over-start)
Response.write (body)
response.write "<anchor title=""back""><prev/>返回上级</anchor>"
response.write "<br/><a href=""adminpst.asp?saytk="&saytk&"&amp;sid="&sid&""">会员管理</a>"
response.write "<br/><a href=""../index.asp?saytk="&saytk&"&amp;sid="&sid&""">管理首页</a><br/>"
response.write "</p></card></wml>" & Chr(13)
%>
