欢迎您访问程序员文章站本站旨在为大家提供分享程序员计算机编程知识!
您现在的位置是: 首页  >  IT编程

asp google pr查询代码

程序员文章站 2022-08-05 20:54:19
复制代码 代码如下:<%@language="javascript"%> google pr值查询 asp程序</title&g...</div> <div class="content"> <div class="codetitle"> <span><a style="cursor: pointer" data="6722" class="copybut" id="copybut6722" onclick="docopy('code6722')" target="_blank" rel="nofollow" href="/default/index/url?u=aHR0cHM6Ly93d3cuMTBxaWFud2FuLmNvbQ=="><u>复制代码</u></a></span> 代码如下:</div> <div class="codebody" id="code6722"> <br><%@language="javascript"%> <br><title>google pr值查询 asp程序</title> <br><% <br>function hexdec(str) <br>{ <br>return parseint(str,16); <br>} <br>function zerofill(a,b) <br>{ <br>var z = hexdec(80000000); <br>if (z & a) <br>{ <br>a = a>>1; <br>a &= ~z; <br>a |= 0x40000000; <br>a = a>>(b-1); <br>} <br>else <br>{ <br>a = a >> b; <br>} <br>return (a); <br>} <br>function mix(a,b,c) <br>{ <br>a -= b; a -= c; a ^= (zerofill(c,13)); <br>b -= c; b -= a; b ^= (a<<8); <br>c -= a; c -= b; c ^= (zerofill(b,13)); <br>a -= b; a -= c; a ^= (zerofill(c,12)); <br>b -= c; b -= a; b ^= (a<<16); <br>c -= a; c -= b; c ^= (zerofill(b,5)); <br>a -= b; a -= c; a ^= (zerofill(c,3)); <br>b -= c; b -= a; b ^= (a<<10); <br>c -= a; c -= b; c ^= (zerofill(b,15)); <br>var ret = new array((a),(b),(c)); <br>return ret; <br>} <br>function googlech(url,length) <br>{ <br>var init = 0xe6359a60; <br>if (arguments.length == 1) <br>length = url.length; <br>var a = 0x9e3779b9; <br>var b = 0x9e3779b9; <br>var c = 0xe6359a60; <br>var k = 0; <br>var len = length; <br>var mixo = new array(); <br>while(len >= 12) <br>{ <br>a += (url[k+0] +(url[k+1]<<8) +(url[k+2]<<16) +(url[k+3]<<24)); <br>b += (url[k+4] +(url[k+5]<<8) +(url[k+6]<<16) +(url[k+7]<<24)); <br>c += (url[k+8] +(url[k+9]<<8) +(url[k+10]<<16)+(url[k+11]<<24)); <br>mixo = mix(a,b,c); <br>a = mixo[0]; b = mixo[1]; c = mixo[2]; <br>k += 12; <br>len -= 12; <br>} <br>c += length; <br>switch(len) <br>{ <br>case 11: <br>c += url[k+10]<<24; <br>case 10: <br>c+=url[k+9]<<16; <br>case 9 : <br>c+=url[k+8]<<8; <br>case 8 : <br>b+=(url[k+7]<<24); <br>case 7 : <br>b+=(url[k+6]<<16); <br>case 6 : <br>b+=(url[k+5]<<8); <br>case 5 : <br>b+=(url[k+4]); <br>case 4 : <br>a+=(url[k+3]<<24); <br>case 3 : <br>a+=(url[k+2]<<16); <br>case 2 : <br>a+=(url[k+1]<<8); <br>case 1 : <br>a+=(url[k+0]); <br>} <br>mixo = mix(a,b,c); <br>if (mixo[2] < 0) <br>return (0x100000000 + mixo[2]); <br>else <br>return mixo[2]; <br>} <br>function strord(s) <br>{ <br>var re = new array(); <br>for(i=0;i<s.length;i++) <br>{ <br>re[i] = s.charcodeat(i); <br>} <br>return re; <br>} <br>//来源于网络,www.jb51.net <br>function c32to8bit(arr32) <br>{ <br>var arr8 = new array(); <br>for(i=0;i<arr32.length;i++) <br>{ <br>for (bitorder=i*4;bitorder<=i*4+3;bitorder++) <br>{ <br>arr8[bitorder]=arr32[i]&255; <br>arr32[i]=zerofill(arr32[i], 8); <br>} <br>} <br>return arr8; <br>} <br>function myfmod(x,y) <br>{ <br>var i = math.floor(x/y); <br>return (x - i*y); <br>} <br>//来源于网络, www. pqshow .com <br>function googlenewch(ch) <br>{ <br>ch = (((ch/7) << 2) | ((myfmod(ch,13))&7)); <br>prbuf = new array(); <br>prbuf[0] = ch; <br>for(i = 1; i < 20; i++) { <br>prbuf[i] = prbuf[i-1]-9; <br>} <br>ch = googlech(c32to8bit(prbuf), 80); <br>return ch; <br>} <br>function urlencode(sstr) <br>{ <br>return encodeuricomponent(sstr).replace(/\+/g,"%2b").replace(/\//g,"%2f"); <br>} <br>function getgooglehostinfo(url){ <br>var reqgr = "info:" + url; <br>var reqgre = "info:" + urlencode(url); <br>//response.write(reqgr+"<br>"+reqgre); 来源于网络, www.jb51.net <br>gch = googlech(strord(reqgr)); <br>gch = "6" + googlenewch(gch); <br>var querystring = "http://toolbarqueries.google.com/search?client=navclient-auto&ch=" + gch + "&ie=utf-8&oe=utf-8&features=rank:fvn&q=" + reqgre; <br>//response.write(querystring); 来源于网络,www.jb51.net <br>var objxmlhttp, xml; <br>xml = server.createobject("microsoft.xmlhttp"); <br>xml.open("get", querystring, false); <br>xml.setrequestheader( "user-agent", "mozilla/4.0 (compatible; googletoolbar 2.0.114-big; windows xp 5.1)" ); <br>xml.send(); <br>return xml.responsetext; <br>} <br>function getpagerank(temp){ <br>var foo = temp.match(/rank_.*?:.*?:(\d+)/i); <br>var pr = (foo) ? foo[1] : ""; <br>return pr; <br>} <br>function getdirectory(temp){ <br>var foo = temp.match(/fvn_.*?:.*?:(?:top\/)?([^\s]+)/i); <br>var cat = (foo) ? foo[1] : ""; <br>if(cat!="")cat="http://directory.google.com/top/"+cat <br>return cat; <br>} <br>//来源于网络,www.jb51.net <br>var site; <br>site="www.baidu.com"; //输入站点名 <br>if(site!="undefined"){ <br>var google=getgooglehostinfo(site); <br>var pagerank=getpagerank(google); <br>var directory=getdirectory(google); <br>response.write("pagerank:"+pagerank+"<br>"); <br>response.write("pagerank:<img src=\"images/pr"+pagerank+".png\" alt=\"pagerank:"+pagerank+"\"><br>"); <br>response.write("site:"+site+"<br>"); <br>if(directory!="")response.write("site:<a href="+directory+">"+directory+"</a><br>"); <br>} <br>%> <br> </div> <br>将上面的代码保存为pr.asp运行即可,如果想要传参,可以将<br>site="www.baidu.com"; //输入站点名 <br>替换为 <br>site=request.querystring("url"); //输入站点名 </div> <div class="info-pre-next"> <p> 上一篇: <a href="/article/1792111.html"> JS短路表达式&&和||的代码实例 </a> </p> <p> 下一篇: <a href="/article/1792113.html"> ASP操作数据库的类 </a> </p> </div> <div class="wz_tuijian"> <p> 推荐阅读 </p> <ul> <li> <a href="/article/2043677.html" target="_blank" title="asp.net 多字段模糊查询代码"> <h2> asp.net 多字段模糊查询代码 </h2> </a> </li> <li> <a href="/article/2024582.html" target="_blank" title="asp查询xml的代码 不刷新页面查询的方法"> <h2> asp查询xml的代码 不刷新页面查询的方法 </h2> </a> </li> <li> <a href="/article/2024381.html" target="_blank" title="asp实现的查询某关键词在MSSQL数据库位置的代码"> <h2> asp实现的查询某关键词在MSSQL数据库位置的代码 </h2> </a> </li> <li> <a href="/article/2010311.html" target="_blank" title="Google PR查询接口checksum新算法第1/2页"> <h2> Google PR查询接口checksum新算法第1/2页 </h2> </a> </li> <li> <a href="/article/1970424.html" target="_blank" title="ASP 多关键词查询实例代码"> <h2> ASP 多关键词查询实例代码 </h2> </a> </li> <li> <a href="/article/1970400.html" target="_blank" title="ASP Google的translate API代码"> <h2> ASP Google的translate API代码 </h2> </a> </li> <li> <a href="/article/1957794.html" target="_blank" title="php实现查询百度google收录情况(示例代码)"> <h2> php实现查询百度google收录情况(示例代码) </h2> </a> </li> <li> <a href="/article/1868038.html" target="_blank" title="获得Google PR值的PHP代码"> <h2> 获得Google PR值的PHP代码 </h2> </a> </li> <li> <a href="/article/1837667.html" target="_blank" title="最新用php获取谷歌PR值算法,附上php查询PR值代码示例"> <h2> 最新用php获取谷歌PR值算法,附上php查询PR值代码示例 </h2> </a> </li> <li> <a href="/article/1798542.html" target="_blank" title="ASP多条件查询功能实现代码(多关键词查询)"> <h2> ASP多条件查询功能实现代码(多关键词查询) </h2> </a> </li> </ul> </div> </article> </div> </main> <footer><div class="box"><div class="ft_nav"><div class="ft_about"><p>关于网站</p><ul><li><a href="/sitemap.xml" target="_blank" title="网站地图">网站地图</a></li><li><a href="/list/2/" title="最新程序员文章站">最新程序员文章站</a></li></ul></div><div class="ft_contact"><ul><li>本站所有数据收集于网络如有侵犯到您的权益,请联系我们进行下架处理。</li><li class="email_show"></li></ul></div></div><div class="copyright"><div class="cr_left"><p> 备案号:<a href="https://beian.miit.gov.cn/#/Integrated/index" target="_blank">粤ICP备20058927号</a></p><p>© Copyright © 2020-2022 www.superweb999.com 程序员文章站. </p></div></div></div></footer> </body> </html>