用XMLHTTP来偷东西哈!

只做了一部份,IP查询请大家自己照着我里边的样例自己完成吧!
演示: http://www.goalercn.com/demo/searcher.asp

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







常用查询









<%
'==========请保留以下信息===============
'作者(Author):goaler
'主页(homepage): http://www.goalercn.com
'=======================================
on error resume next
Dim url,PostStr,sType,getContent,i
sType = Trim(Request.QueryString("sType"))
%>

手机号归属地查询

 <%
 Dim MobileNumber
 MobileNumber = Trim(Request.Form("MobileNumber"))
 %>
 
 
  请输入手机号码段:" onfocus="select()" /> 
  输入完整的11位手机号或手机号前七位
 
 

 <%
 IF(sType = "mobile" AND MobileNumber<>"")THEN
  Dim getArea,getType
  PostStr = "action=mobile&mobile="&MobileNumber
  getContent=GetURL(" http://www.ip138.com:8080/search.asp",PostStr)
  getArea = RegExpText(getContent,"卡号归属地((.|\n)*?)")
  getType = RegExpText(getContent,"卡 类 型((.|\n)*?)")
  Response.Write("
    ")
      Response.Write("
  • 手机号码段:" & MobileNumber & "
  • ")
      Response.Write("
  • 号码归属地:" & Replace(getArea,",","") & "
  • ")
      Response.Write("
  • 卡 类 型:" & Replace(getType,",","") & "
  • ")
      Response.Write("
")
 END IF
 %>



Google PR 值查询

 <%
 Dim domainName
 domainName = Replace(Replace(LCASE(Trim(Request.Form("domainName"))),"www.","")," http://","")
 %>
 
  
  请输入域名  :www." /> 
  不要带  http://www.
  
 

 <%
 IF(sType = "pr" AND domainName<>"")THEN
  PostStr = ""
  getContent=GetURL(" http://so.5eo.com/info.php?action=ra ... "&domainName,PostStr)
  getContent=RegExpText(getContent,"在满分10分评价中获得 ((.|\n)*?) 分")
  'getContent=ReplaceKey(getContent,"在满分10分评价中获得 ||||| 分")
  Dim ArrayPr
  ArrayPr=Split(getContent,",")

  Response.Write("
    ")
      Response.Write("
  •  的Google PageRank值:"&ArrayPr(0)&"
  • ")

      Response.Write("
  •  的Google PageRank值:"&ArrayPr(1)&"")
      Response.Write("
")
 END IF
 %>




地区<->区号查询

 
 <%
 Dim zoneName
 zoneName = Trim(Request.Form("zoneName"))
 %>
 
 地  区      区  号:" onfocus="select()" /> 
 
 

 <%
 IF(sType = "zone2number" AND zoneName <> "")THEN
  Dim getNumber,ArrayNumber
  PostStr = "area=" & escape(zoneName) & "&action=area2zone"
  getContent=GetURL(" http://www.ip138.com/post/search.asp",PostStr)
  getNumber = RegExpText(getContent,"◎((.|\n)*?)")
  Response.Write("
    ")
      IF(getNumber="")THEN
       Response.Write("
  • 没有搜索到记录
  • ")
      ELSE
       ArrayNumber = split(getNumber,",")
       IF(isArray(ArrayNumber))THEN
        For i=0 TO UBOUND(ArrayNumber)-1
         Response.Write("
  • "&Replace(ArrayNumber(i),",","")&"
  • ")
        Next
       ELSE
        Response.Write("
  • "&Replace(getNumber,",","")&"
  • ")
       END IF 
      END IF 
      Response.Write("
")
 END IF 


 Dim zoneNumber
 zoneNumber = Trim(Request.Form("zoneNumber"))
 %>
 
 
 区  号      地  区:" onfocus="select()" /> 
 
 

 <%
 IF(sType = "number2zone" AND zoneNumber <> "")THEN
  Dim getZone,ArrayZone
  PostStr = "action=zone2area&zone="&zoneNumber
  getContent=GetURL(" http://www.ip138.com/post/search.asp",PostStr)
  getZone = RegExpText(getContent,"◎((.|\n)*?)")
  Response.Write("
    ")
      IF(getZone="")THEN
       Response.Write("
  • 没有搜索到记录
  • ")
      ELSE
       ArrayZone = split(getZone,",")
       IF(isArray(ArrayZone))THEN
        For i=0 TO UBOUND(ArrayZone)-1
         Response.Write("
  • "&Replace(ArrayZone(i),",","")&"
  • ")
        Next
       ELSE
        Response.Write("
  • "&Replace(getZone,",","")&"
  • ")
       END IF 
      END IF 
      Response.Write("
")
 END IF 
 %>




IP地理位置查询

 
  
  待查询的IP地址:" /> 
  
 






身份证号码查询

 <%
 Dim identityNumber
 identityNumber = Trim(Request.Form("identityNumber"))
 %>
 
  
  15或18位身份证号:" /> 
  
 

 <%
 IF(sType = "identity" AND identityNumber<>"")THEN
  Dim ArrayIDCardInfo
  PostStr = "action=idcard&userid="&identityNumber
  getContent=GetURL(" http://www.oicq88.com/idsearch/index.asp",PostStr)
  getContent=RegExpText(getContent,":((.|\n)*?)
")
  Response.Write("
    ")
      IF(getContent="")THEN
       Response.Write("
  • 身份证号码错误或没有查询到相关数据
  • ")
      ELSE
       ArrayIDCardInfo = split(getContent,",")
       Response.Write("
  • 性        别:"&Replace(ArrayIDCardInfo(0),",","")&"
  • ")
       Response.Write("
  • 出生日期:"&Replace(ArrayIDCardInfo(1),",","")&"
  • ")
       Response.Write("
  • 发证地区:"&Replace(ArrayIDCardInfo(2),",","")&"
  • ")
      END IF 
      Response.Write("
")
 END IF
 %>
 
  
  15位号码升至18位:" /> 
  
 

 <%
 IF(sType = "upIdentity" AND identityNumber<>"")THEN
  PostStr = "action=upto18&userid="&identityNumber
  getContent=GetURL(" http://www.oicq88.com/idsearch/index.asp",PostStr)
  getContent=RegExpText(getContent,"升位后号码:((.|\n)*?)")
  Response.Write("")
 END IF
 %>




 DESIGNED BY  For i = 1 To LenB(vIn)
  ThisCharCode = AscB(MidB(vIn,i,1))
  If ThisCharCode < &H80 Then
   strReturn = strReturn & Chr(ThisCharCode)
  Else
   NextCharCode = AscB(MidB(vIn,i+1,1))
   strReturn = strReturn & Chr(CLng(ThisCharCode) * &H100 + CInt(NextCharCode))
   i = i + 1
  End If
 Next
 ByteToStr = strReturn 
End Function

Function GetURL(url,PostStr)
 Set Retrieval = Server.CreateObject("Microsoft.XMLHTTP")
 With Retrieval
  .Open "POST", url, false ,"" ,""
  .setRequestHeader "Content-Type"," application/x-www-form-urlencoded"
  .Send(PostStr)
  GetURL = .ResponseBody
 End With
 Set Retrieval = Nothing
 GetURL=ByteToStr(GetURL)
End Function

Function RegExpText(strng,regStr)
 Dim regEx,Match,Matches,RetStr
 Set regEx = New RegExp
 regEx.Pattern = regStr
 regEx.IgnoreCase = True
 regEx.Global = True
 Set Matches = regEx.Execute(strng)
 For Each Match in Matches
  RetStr = RetStr & regEx.Replace(Match.Value,"$1") & "," 
 Next
 RegExpText = RetStr
 set regEx=nothing
End Function
%>

你可能感兴趣的:(用XMLHTTP来偷东西哈!)