ASP mobile phone attribution to the query program

Source: Internet
Author: User
Tags domain registration

Provide a asp,xmlhttp to realize the mobile phone number attribution to query source Oh, you can see this code is not suitable for you oh, good crap don't say much to see it.
Class Clssteal

Private Src_ ' acquisition of the target URL
Private prm_ ' incoming post or get parameter
Private enc_ ' character encoding
Private Value_ ' Collection of content
Private Sub Class_Initialize ()
Src_= ""
Prm_= ""
enc_= "GB2312"
Value_= ""
End Sub

Private Sub Class_Terminate ()
End Sub

Public Property Let Src (str)
Src_=str
End Property

Public Property Let Rqst (str)
Prm_=str
End Property

Public Property Let enc (str)
Enc_=str
End Property

Public Property Get Value
Value=value_
End Property

Public Sub Send (Pmethod)
If src_= "" Then
value_= "src attribute cannot be empty"
Exit Sub
End If

On Error Resume Next
Dim Http
Set Http=server.createobject ("MSXML2. XMLHTTP ")
If UCase (pmethod) = "POST" Then
Http.open "POST", Src_, False
Http.setrequestheader "Content-length", Len (PRM_)
Http.setrequestheader "Content-type", "application/x-www-form-urlencoded"
Http.send (PRM_)
Else
Http.open "Get", Src_, False
Http.send ()
End If

If Http.readystate<>4 then Exit Sub

Value_=bytestobstr (Http.responsebody)
Value_=lcase (Value_)
Set http=nothing
If Err.number<>0 then err. Clear
End Sub

Private function Bytestobstr (body)
Dim ostm
Set ostm = Server.CreateObject ("ADODB.stream")
Ostm.type = 1
Ostm.mode =3
Ostm.open
Ostm.write body
ostm.position = 0
Ostm.type = 2
Ostm.charset = enc_
Bytestobstr = Ostm.readtext
Ostm.close
Set ostm = Nothing
End Function

Public Sub-cut (strbeg,strend)
Ih=instr (LCase (Value_), Strbeg)
Ib=instr (LCase (Value_), strend)
If Ih>0 and ib>0 then Value_=mid (Value_, Ih+len (Strbeg), Ib-ih-len (Strend))
End Sub

Public Sub Exch (strold,strnew)
Value_=replace (Value_, Strold, strnew)
End Sub

End Class
%>

<!--#include file= "stealclass.asp"-->
<%
Dim Mystl,outstr,url,vpost,vmethod
Dim arytext '//Text data
Dim astr,vhtml
Vpost=request.form ("Hicode")

Set Mystl=new clssteal
Mystl.src= "http://www.hi5360.com/open/Tool1.0.asp?t=mobile&c=" &vpost
Mystl.send ("Get")
Arytext=mystl.value
Set mystl=nothing

Response.Write ("<br>&nbsp; now, collected string data for" <font color=red> "&replace (Arytext," Response.Write ("<br>&nbsp; today, the data after the conversion of the number of groups are as follows:")
Astr=split (Arytext, "For i=0 to UBound (ASTR)-1
vhtml=vhtml& "<br>&nbsp;&nbsp; ["&i&"] <font color=green> "&astr (i) &" </font> "
Next
Response.Write (vhtml)

%>
<link href= "Inc/hi5360.css" Type=text/css rel=stylesheet>
<br><br>
<table width=280 border= "1" align= "Center" cellpadding= "4" bordercolor= #3366cc style= "border-collapse:collapse; Font-family: Song body; font-size:12px; " >
&LT;TR class=tdc bgcolor= #ffffff >
&LT;TD width= align= "center" noswap> mobile phone number segment </td>
&LT;TD width= "align=" "Center" ><%=astr (0)%></td>
</tr>
&LT;TR class=tdc bgcolor= #ffffff >
&LT;TD align= "center" > Card number </td><td align= "center" ><%=astr (1)%></td>
</tr>
&LT;TR class=tdc bgcolor= #ffffff >
&LT;TD align= "Center" > Card Type </td><td align= "center" ><%=astr (2)%></td>
</tr>
&LT;TR class=tdc bgcolor= #ffffff >
&LT;TD align= "Center" > Area code </td><td align= "Center" ><%=astr (3)%></td>
</tr>
&LT;TR class=tdc bgcolor= #ffffff >
&LT;TD align= "center" > Zip </td><td align= "center" ><%=astr (4)%></td>
</tr>
</table>

Webmaster more common tools online inquiry

Included Query | Alexa Query | Domain Registration Query | Whois Query | IP Address Query | PR Query | Weather Information | Imitation Spider | Links inquiry

Webmaster Common Tools Download

  • SEO Query tool
  • Other tools
  • PR Query
  • IP address Query
  • Whois query
  • Domain Registration Query
  • Alexa ranking Query
  • Included query
  • Uploading software
  • Operating system installation files
  • Push and expand Software
  • Web Editor
  • Related Article

    Contact Us

    The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

    If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

    A Free Trial That Lets You Build Big!

    Start building with 50+ products and up to 12 months usage for Elastic Compute Service

    • Sales Support

      1 on 1 presale consultation

    • After-Sales Support

      24/7 Technical Support 6 Free Tickets per Quarter Faster Response

    • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.