用XMLHTTP来偷东西哈!
用XMLHTTP来偷东西哈!
发布时间:2016-12-29 来源:查字典编辑
摘要:只做了一部份,IP查询请大家自己照着我里边的样例自己完成吧!演示:http://www.goalercn.com/demo/searcher...

只做了一部份,IP查询请大家自己照着我里边的样例自己完成吧!

演示:http://www.goalercn.com/demo/searcher.asp

<%@LANGUAGE="VBSCRIPT"CODEPAGE="936"%>

<!DOCTYPEhtmlPUBLIC"-//W3C//DTDXHTML1.0Transitional//EN""http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html>

<head>

<metahttp-equiv="Content-Type"content="text/html;charset=gb2312"/>

<METANAME="Author"CONTENT="goaler"/>

<METANAME="Keywords"CONTENT="手机号码归属地,ip,googlepr,邮编,身份证,查询,升位,goaler,www.goalercn.com"/>

<METANAME="Description"CONTENT="手机号码归属地,ip,googlepr,邮编,身份证,查询,升位,goaler,www.goalercn.com"/>

<title>常用查询</title>

<styletype="text/css">

<>

</style>

<SCRIPTLANGUAGE="JavaScript">

<>

</SCRIPT>

</head>

<body>

<%

'==========请保留以下信息===============

'作者(Author):goaler

'主页(homepage):http://www.goalercn.com

'=======================================

onerrorresumenext

Dimurl,PostStr,sType,getContent,i

sType=Trim(Request.QueryString("sType"))

%>

<fieldset>

<legend><strong>手机号归属地查询</strong></legend>

<div>

<%

DimMobileNumber

MobileNumber=Trim(Request.Form("MobileNumber"))

%>

<divstyle="padding-left:23px;margin-bottom:8px;">

<formmethod="post"name="mobileForm"action="searcher.asp?sType=mobile"onsubmit="returncheckMobile()">

请输入手机号码段:<inputtype="text"name="MobileNumber"value="<%=MobileNumber%>"onfocus="select()"/><inputtype="submit"id="subBtn"value="查询"/>

输入完整的11位手机号或手机号前七位

</form>

</div>

<%

IF(sType="mobile"ANDMobileNumber<>"")THEN

DimgetArea,getType

PostStr="action=mobile&mobile="&MobileNumber

getContent=GetURL("http://www.ip138.com:8080/search.asp",PostStr)

getArea=RegExpText(getContent,"卡号归属地</TD>((.|n)*?)</TD>")

getType=RegExpText(getContent,"卡类型</TD>((.|n)*?)</TD>")

Response.Write("<UL>")

Response.Write("<li><strong>手机号码段:</strong><fontcolor=""#008000""><strong>"&MobileNumber&"</strong></font></li>")

Response.Write("<li><strong>号码归属地:</strong><fontcolor=""#008000""><strong>"&Replace(getArea,",","")&"</strong></font></li>")

Response.Write("<li><strong>卡类型:</strong><fontcolor=""#008000""><strong>"&Replace(getType,",","")&"</strong></font></li>")

Response.Write("</UL>")

ENDIF

%>

</div>

</fieldset>

<fieldset>

<legend><strong>GooglePR值查询</strong></legend>

<div>

<%

DimdomainName

domainName=Replace(Replace(LCASE(Trim(Request.Form("domainName"))),"www.",""),"http://","")

%>

<divstyle="padding-left:23px;margin-bottom:8px;">

<formname="prForm"method="post"action="searcher.asp?sType=pr"onsubmit="returncheckPR()">

请输入域名:www.<inputtype="text"name="domainName"value="<%=domainName%>"/><inputtype="submit"value="提交"/>

不要带http://www.

</form>

</div>

<%

IF(sType="pr"ANDdomainName<>"")THEN

PostStr=""

getContent=GetURL("http://so.5eo.com/info.php?action=ra ... "&domainName,PostStr)

getContent=RegExpText(getContent,"在满分10分评价中获得<fontcolor=#FB5E3C>((.|n)*?)</font>分")

'getContent=ReplaceKey(getContent,"在满分10分评价中获得<fontcolor=#FB5E3C>|||||</font>分")

DimArrayPr

ArrayPr=Split(getContent,",")

Response.Write("<UL>")

Response.Write("<li><ahref=""http://"&domainName&"""target=""new""><fontcolor=" ... t;&domainName&"</strong></font></a>的GooglePageRank值:<fontcolor=""#FF0000""><strong>"&ArrayPr(0)&"</strong></font></li>")

Response.Write("<li><ahref=""http://www."&domainName&"""target=""new""><fontcolor=" ... uot;&domainName&"</font></strong></a>的GooglePageRank值:<fontcolor=""#FF0000""><strong>"&ArrayPr(1)&"</strong></font>")

Response.Write("</UL>")

ENDIF

%>

</div>

</fieldset>

<fieldset>

<legend><strong>地区<->区号查询</strong></legend>

<div>

<divstyle="padding-left:23px;margin-bottom:8px;">

<%

DimzoneName

zoneName=Trim(Request.Form("zoneName"))

%>

<formname="Zone2NumberForm"method="post"action="searcher.asp?sType=zone2number"onsubmit="returncheckZone2NumberForm()">

地区<strong>→</strong>区号:<inputtype="text"name="zoneName"value="<%=zoneName%>"onfocus="select()"/><inputtype="submit"value="提交"/>

</form>

</div>

<%

IF(sType="zone2number"ANDzoneName<>"")THEN

DimgetNumber,ArrayNumber

PostStr="area="&escape(zoneName)&"&action=area2zone"

getContent=GetURL("http://www.ip138.com/post/search.asp",PostStr)

getNumber=RegExpText(getContent,"<TR><TDclass=tdc2>◎((.|n)*?)</TD>")

Response.Write("<UL>")

IF(getNumber="")THEN

Response.Write("<li><strong><fontcolor=""#FF0000"">没有搜索到记录</font></strong></li>")

ELSE

ArrayNumber=split(getNumber,",")

IF(isArray(ArrayNumber))THEN

Fori=0TOUBOUND(ArrayNumber)-1

Response.Write("<li><strong><fontcolor=""#008000"">"&Replace(ArrayNumber(i),",","")&"</font></strong></li>")

Next

ELSE

Response.Write("<li><strong><fontcolor=""#008000"">"&Replace(getNumber,",","")&"</font></strong></li>")

ENDIF

ENDIF

Response.Write("</UL>")

ENDIF

DimzoneNumber

zoneNumber=Trim(Request.Form("zoneNumber"))

%>

<divstyle="padding-left:23px;margin-bottom:8px;">

<formname="Number2ZoneForm"method="post"action="searcher.asp?sType=number2zone"onsubmit="returncheckNumber2ZoneForm()">

区号<strong>→</strong>地区:<inputtype="text"name="zoneNumber"value="<%=zoneNumber%>"onfocus="select()"/><inputtype="submit"value="提交"/>

</form>

</div>

<%

IF(sType="number2zone"ANDzoneNumber<>"")THEN

DimgetZone,ArrayZone

PostStr="action=zone2area&zone="&zoneNumber

getContent=GetURL("http://www.ip138.com/post/search.asp",PostStr)

getZone=RegExpText(getContent,"<TR><TDclass=tdc2>◎((.|n)*?)</TD>")

Response.Write("<UL>")

IF(getZone="")THEN

Response.Write("<li><strong><fontcolor=""#FF0000"">没有搜索到记录</font></strong></li>")

ELSE

ArrayZone=split(getZone,",")

IF(isArray(ArrayZone))THEN

Fori=0TOUBOUND(ArrayZone)-1

Response.Write("<li><strong><fontcolor=""#008000"">"&Replace(ArrayZone(i),",","")&"</font></strong></li>")

Next

ELSE

Response.Write("<li><strong><fontcolor=""#008000"">"&Replace(getZone,",","")&"</font></strong></li>")

ENDIF

ENDIF

Response.Write("</UL>")

ENDIF

%>

</div>

</fieldset>

<fieldset>

<legend><strong>IP地理位置查询</strong></legend>

<div>

<divstyle="padding-left:23px;margin-bottom:8px;">

<formname="ipForm"method="post"action="searcher.asp?sType=ip"onsubmit="returncheckIPForm()">

待查询的IP地址:<inputtype="text"name="ipAddress"value="<%=ipAddress%>"/><inputtype="submit"value="提交"/>

</form>

</div>

</div>

</fieldset>

<fieldset>

<legend><strong>身份证号码查询</strong></legend>

<div>

<%

DimidentityNumber

identityNumber=Trim(Request.Form("identityNumber"))

%>

<divstyle="padding-left:23px;margin-bottom:8px;">

<formname="identityForm"method="post"action="searcher.asp?sType=identity"onsubmit="returncheckIdentityForm()">

15或18位身份证号:<inputtype="text"name="identityNumber"value="<%=identityNumber%>"/><inputtype="submit"value="提交"/>

</form>

</div>

<%

IF(sType="identity"ANDidentityNumber<>"")THEN

DimArrayIDCardInfo

PostStr="action=idcard&userid="&identityNumber

getContent=GetURL("http://www.oicq88.com/idsearch/index.asp",PostStr)

getContent=RegExpText(getContent,":</font>((.|n)*?)<BR>")

Response.Write("<UL>")

IF(getContent="")THEN

Response.Write("<li>身份证号码错误或没有查询到相关数据</li>")

ELSE

ArrayIDCardInfo=split(getContent,",")

Response.Write("<li><strong>性别:</strong><fontcolor=""#008000""><strong>"&Replace(ArrayIDCardInfo(0),",","")&"</strong></font></li>")

Response.Write("<li><strong>出生日期:</strong><fontcolor=""#008000""><strong>"&Replace(ArrayIDCardInfo(1),",","")&"</strong></font></li>")

Response.Write("<li><strong>发证地区:</strong><fontcolor=""#008000""><strong>"&Replace(ArrayIDCardInfo(2),",","")&"</strong></font></li>")

ENDIF

Response.Write("</UL>")

ENDIF

%>

<divstyle="padding-left:23px;margin-bottom:8px;">

<formname="identityUpForm"method="post"action="searcher.asp?sType=upIdentity"onsubmit="returncheckIdentityUpForm()">

15位号码升至18位:<inputtype="text"name="identityNumber"value="<%=identityNumber%>"/><inputtype="submit"value="提交"/>

</form>

</div>

<%

IF(sType="upIdentity"ANDidentityNumber<>"")THEN

PostStr="action=upto18&userid="&identityNumber

getContent=GetURL("http://www.oicq88.com/idsearch/index.asp",PostStr)

getContent=RegExpText(getContent,"升位后号码:((.|n)*?)</TD>")

Response.Write("<UL>")

IF(getContent="")THEN

Response.Write("<li>身份证号码错误或没有查询到相关数据</li>")

ELSE

Response.Write("<li><strong>升位(18位)后号码是:</strong><fontcolor=""#008000""><strong>"&Replace(getContent,",","")&"</strong></font></li>")

ENDIF

Response.Write("</UL>")

ENDIF

%>

</div>

</fieldset>

<divstyle="padding:15px;text-align:center;">

DESIGNEDBY<ahref="http://www.goalercn.com"target=" ... R</a><BR/>

</div>

</body>

</html>

<%

FunctionByteToStr(vIn)

DimstrReturn,i,ThisCharCode,innerCode,Hight8,Low8,NextCharCode

strReturn=""

Fori=1ToLenB(vIn)

ThisCharCode=AscB(MidB(vIn,i,1))

IfThisCharCode<&H80Then

strReturn=strReturn&Chr(ThisCharCode)

Else

NextCharCode=AscB(MidB(vIn,i+1,1))

strReturn=strReturn&Chr(CLng(ThisCharCode)*&H100+CInt(NextCharCode))

i=i+1

EndIf

Next

ByteToStr=strReturn

EndFunction

FunctionGetURL(url,PostStr)

SetRetrieval=Server.CreateObject("Microsoft.XMLHTTP")

WithRetrieval

.Open"POST",url,false,"",""

.setRequestHeader"Content-Type","application/x-www-form-urlencoded"

.Send(PostStr)

GetURL=.ResponseBody

EndWith

SetRetrieval=Nothing

GetURL=ByteToStr(GetURL)

EndFunction

FunctionRegExpText(strng,regStr)

DimregEx,Match,Matches,RetStr

SetregEx=NewRegExp

regEx.Pattern=regStr

regEx.IgnoreCase=True

regEx.Global=True

SetMatches=regEx.Execute(strng)

ForEachMatchinMatches

RetStr=RetStr®Ex.Replace(Match.Value,"$1")&","

Next

RegExpText=RetStr

setregEx=nothing

EndFunction

%>

推荐文章
猜你喜欢
附近的人在看
推荐阅读
拓展阅读
相关阅读
网友关注
最新ASP教程学习
热门ASP教程学习
编程开发子分类