同IP反向查找域名的ASP代码分享

在很多网站上找了半天,最后在一个英文站上看见可以通过live.com的搜索结果提取此类信息,于是写了下面一段:程序只是测试成功,没有进行优化,查询效率有点低!

<%
        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 = nothing
        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 Each 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
        %>

  来自:www.cnwebmaster.info演示:http://www.cnwebmaster.info/tool/tip.asp(临时演示地址)

  提示“网站综合信息查询工具”本人正在开发!届时你只需要输入一个域名将得到很多有关于这个域名的信息!不需要象有些网站一样,查个东西需要输入很多次!

时间: 2024-07-29 16:03:51

同IP反向查找域名的ASP代码分享的相关文章

同ip反查域名ASP代码分享

中介交易 http://www.aliyun.com/zixun/aggregation/6858.html">SEO诊断 淘宝客 云主机 技术大厅 前两天想写一段同ip反查域名的代码,在很多网站上找了半天,最后在一个英文站上看见可以通过live.com的搜索结果提取此类信息,于是写了下面一段:程序只是测试成功,没有进行优化,查询效率有点低! <%Dim strPageFunction GetPage2(Path)        t = GetBody(Path)        Ge

分享同IP反向查询域名ASP源代码

&http://www.aliyun.com/zixun/aggregation/37954.html">nbsp;      前两天想写一段同ip反查域名的代码,在很多网站上找了半天,最后在一个英文站上看见可以通过live.com的搜索结果提取此类信息,于是写了下面一段:程序只是测试成功,没有进行优化,查询效率有点低! <%Dim strPageFunction GetPage2(Path)        t = GetBody(Path)        GetPage2=

多个绑定多域名的ASP代码

如果有有一个ASP空间,而你又想放置多个多个站点,这些代码可以帮到你 第一个 <%if Request.ServerVariables("SERVER_NAME")=www.webjx.com then response.redirect "williamlong/"else response.redirect "i.htm"end if%> 第二个 <%select case request.servervariables(&

限制一个Ip只能访问一次的asp代码

  限制一个Ip只能访问一次,转载于bacde的技术博客,现在将asp代码分享给大家: <% '///////////////////////////////////////////////////// '// // '//作用:一个IP地址只允许访问本页一次 // '//作者:BaCde 2010年3月1日 // '//引用:<!-- #include file="Check_Ip.asp" --> // '// // '//////////////////////

绑定多域名的PHP代码

这是一段很有用的代码,和绑定多域名的ASP代码类似,如果你只有一个PHP空间,而你又想放置多个多个站点,下面这些代码可以帮到你.代码很简单,与绑定多域名的ASP代码相似,就不多介绍了. 第一个: if($HTTP_HOST=="www.moon-soft.com"){Header("Location: moon.htm");}elseif($HTTP_HOST=="www.williamlong.info"){Header("Locat

session-跪求:asp公网ip多投票,怎么修改代码?

问题描述 跪求:asp公网ip多投票,怎么修改代码? Function getIP() getIP = Request.ServerVariables("HTTP_X_FORWARDED_FOR") If getIP = "" Then getIP = (Request.ServerVariables("REMOTE_ADDR")) End Function ipdate=getIP&date() if ipdate<>&qu

asp.net获取当前网址url的各种属性(文件名、参数、域名 等)的代码_实用技巧

设当前页完整地址是:http://www.jb51.net/aaa/bbb.aspx?id=5&name=kelli "http://"是协议名 "www.jb51.net"是域名 "aaa"是站点名 "bbb.aspx"是页面名(文件名) "id=5&name=kelli"是参数 [1]获取 完整url (协议名+域名+站点名+文件名+参数) 复制代码 代码如下: string url=R

asp 检测域名是否注册代码

asp 检测域名是否注册代码 <% On Error Resume Next Server.ScriptTimeOut=9999999 Function getHTTPPage(Path)         t = GetBody(Path)   getHTTPPage=BytesToBstr(t,"GB2312") End function Function GetBody(url)         on error resume next         Set Retriev

C# 网络编程之获取本机名、ip地址、域名、物理位置

在C#网络编程中,主机域名与ip之间能相互转换,同时DNS中有Dns类.IPHostEntry类.IPAddress类.DnsPermission类实现DNS的一些简单功能.下面主要讲述一个C#的Windows应用程序,实现以下功能:(1).获取主机名称;(2).获取本地电脑的ip地址;(3).输入远程域名www.xxx.com,查询其网址的ip地址;(4).根据其远程网址的ip地址,查找其物理位置;(5).根据物理位置实现查找当地位置的天气预报(未实现).具体步骤如下:1.创建C#项目点击"文