asp google pr查询程序代码

<%
response.expires = -1
response.addheader "cache-control","no-cache"
Response.AddHeader "Pragma","no-cache"
wd=Request("d")
If Request("s")="googles" Then
  GoogleUrl="http://www.google.cn/search?hl=zh-CN&q=link%3A"&wd
Else
  GoogleUrl="http://www.google.cn/search?hl=zh-CN&q=site%3A"&wd
End If
TempStr= getHTTPPage(GoogleUrl)
dim GoogleWebSite
set reg=new Regexp
reg.Multiline=True
reg.Global=Flase
reg.IgnoreCase=true
reg.Pattern="有 <b>((.|n)*?)</b> "
Set matches = reg.execute(TempStr)
For Each match1 in matches
GoogleWebSite=match1.Value
Next
Set matches = Nothing
Set reg = Nothing
GoogleWebSite=Replace(GoogleWebSite,"有 <b>","")
GoogleWebSite=Replace(GoogleWebSite,"</b> ","")
GoogleWebSite=Replace(GoogleWebSite,",","")
GoogleWebSite=Replace(GoogleWebSite,"","")

If GoogleWebSite="" Then
  If Request("s")="googles" Then
    Response.Write ("document.write (""<a href='http://www.google.cn/search?hl=zh-CN&q=link%3A"&wd&"' target='_blank' title='数据获取出错,请稍后重新查询!'><font color=#999999><b>x</b></font></a>"");")
  Else
    Response.Write ("document.write (""<a href='http://www.google.cn/search?hl=zh-CN&q=site%3A"&wd&"' target='_blank' title='数据获取出错,请稍后重新查询!'><font color=#999999><b>x</b></font></a>"");")
  End If
Else
  If Request("s")="googles" Then
    Response.Write ("document.write (""<a href='http://www.google.cn/search?hl=zh-CN&q=link%3A"&wd&"' target='_blank' title='"&GoogleWebSite&" "&wd&"' rel=nofollow class=LN>"&GoogleWebSite&"</a>"");")
  Else
    Response.Write ("document.write (""<a href='http://www.google.cn/search?hl=zh-CN&q=site%3A"&wd&"' target='_blank' title='"&GoogleWebSite&" "&wd&"' rel=nofollow class=LN>"&GoogleWebSite&"</a>"");")
  End If
End If

Function getHTTPPage(Path)
        t = GetBody(Path)
        getHTTPPage=BytesToBstr(t,"utf-8")
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("ado"&"db.str"&"eam")
        objstream.Type = 1 '1-二进制,2-文本     数据类型
        objstream.Mode = 3 '1-读,2-写,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
%>

时间: 2024-09-20 09:44:57

asp google pr查询程序代码的相关文章

asp google pr查询代码_应用技巧

复制代码 代码如下: <%@LANGUAGE="JAVASCRIPT"%> <title>Google PR值查询 asp程序</title> <% function hexdec(str) { return parseInt(str,16); } function zeroFill(a,b) { var z = hexdec(80000000); if (z & a) { a = a>>1; a &= ~z; a

asp google pr查询代码

复制代码 代码如下: <%@LANGUAGE="JAVASCRIPT"%> <title>Google PR值查询 asp程序</title> <% function hexdec(str) { return parseInt(str,16); } function zeroFill(a,b) { var z = hexdec(80000000); if (z & a) { a = a>>1; a &= ~z; a

asp 完整google pr 查询程序

Google对PR查询加密后,ASP版的PR查询代码就很少见了,今天找到一个,给需要的站长,完整的代码如下: <%@LANGUAGE="JAVASCRIPT"%> <form name="zzsky" method="get" action=""> <input type="text" name="site"> <input type="

php goolge pr查询程序代码

//下面的函数用于查pr function zeroFill($a, $b) {  $z = hexdec(80000000);  if ($z & $a)  {   $a = ($a>>1);   $a &= (~$z);   $a |= 0x40000000;   $a = ($a>>($b-1));  }  else  {   $a = ($a>>$b);  }  return $a; } function mix($a,$b,$c) {  $a

最新Google PR查询工具GoogleCH函数核心代码

取自国外编程开发技术论坛里的代码,最新Google PR查询工具GoogleCH函数核心代码,获取最新的GOOGLE PR值. 代码如下. [code]<?php define('GOOGLE_MAGIC', 0xE6359A60); function obtainPR($data) {      $ret = array();      $parser = xml_parser_create();      xml_parser_set_option($parser,XML_OPTION_CA

asp获取搜索蜘蛛程序代码

asp获取搜索蜘蛛程序代码 Function GetSearcher(ByVal strUrl)  On Error Resume Next  If Len(strUrl) < 5 Then   GetSearcher = "DirectInput"   Exit Function  End If  If strUrl = ''Or InStr(strUrl, ":") = 0 Then   GetSearcher = "DirectInput&qu

asp+的论坛列表程序---代码部分

asp+|程序 原作者: 雨晨asp+的论坛列表程序---代码部分 -------------------------------------------------------------------------------- [bigeagle] 于 2000-11-13 15:38:57 加贴在 Joy ASP ↑: /////////////////////////////////////////////////////////////////////////////// // // F

asp.net下载文件程序代码

asp.net下载文件程序代码 System.IO.FileInfo file = new System.IO.FileInfo(pstrFilePath); if (file.Exists) { Response.Clear(); Response.Charset = "GB2312"; Response.ContentEncoding = System.Text.Encoding.UTF8; Response.AddHeader("Content-Disposition&

php获取google pr 值的代码

/* *功能:对URL进行编码 *参数说明:$web_url 网站URL,不包含"http://",例如111cn.net *来源:http://111cn.net */  代码如下 复制代码 function HashURL($url){ $SEED = "Mining PageRank is AGAINST GOOGLE'S TERMS OF SERVICE. Yes, I'm talking to you, scammer."; $Result = 0x010