With IP anti-search domain name ASP code sharing

Source: Internet
Author: User
Keywords Domain

Intermediary transaction http://www.aliyun.com/zixun/aggregation/6858.html ">seo diagnose Taobao guest cloud host technology Hall

Two days ago want to write a section with IP reverse domain name code, in many sites for a long time, and finally in an English station can be seen through live.com search results extracted such information, so wrote the following paragraph: The program is only successful test, did not optimize, query efficiency a bit low!

<%
Dim strpage
Function GetPage2 (Path)
t = GetBody (Path)
Getpage2=bytestobstr (T, "GB2312")
End Function

Function getbody (URL)
        On Error Resume Next
         Set retrieval = CreateObject ("Microsoft.XMLHTTP")
         with retrieval
       . Open "Get", url, False, "", "
       . Send
        getbody =. Responsebody
        End With
         Set retrieval = Nothing
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 = no
end Function

Public Function GetDomain (TEMPSTR,MATCHSTR)
Set Reg=new Regexp
Reg. Multiline=true
Reg. Global=true
Reg. Ignorecase=true
Reg. Pattern=matchstr
Set matches = Reg.execute (TEMPSTR)
For the match in matches
If not InStr (Getdomain,match. Value) >0 Then
Getdomain=getdomain&match. Value
End If
Next
End Function

Dim i
For I=1 to 15
Strpage=strpage&getpage2 ("http://cnweb.search.live.com/results.aspx?q=ip%3A59.54.54.167&first=" &i & "1")
Next
Strpage=getdomain (Strpage, "<cite>") \/")
Strpage=replace (Strpage, "<cite>", "<li class=classli>")
Strpage=replace (Strpage, "</", "</")
Strpage=replace (Strpage, "/", "</li>")
Strpage=replace (Strpage, "<<", "<")
Strpage=getdomain (Strpage, "<li") \/li> ")

Response.Write Strpage
%>

From: Www.cnwebmaster.info Demo: http://www.cnwebmaster.info/tool/tip.asp (Temporary demo address)

Hint "website comprehensive information Inquiry tool" I am developing! Then you only need to enter a domain name will get a lot of information about this domain name! Do not need to be like some websites, check a thing to enter many times!

For communication please contact qq:39100642

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.