国产探花免费观看_亚洲丰满少妇自慰呻吟_97日韩有码在线_资源在线日韩欧美_一区二区精品毛片,辰东完美世界有声小说,欢乐颂第一季,yy玄幻小说排行榜完本

首頁 > 編程 > ASP > 正文

可以查詢百度排名的asp源碼放送了

2024-05-04 10:58:22
字體:
供稿:網(wǎng)友
以下是源碼,請命名為.asp文件

復(fù)制代碼 代碼如下:

<% 
bpn = request("bpn") 
if(bpn = "") then 
 bpn = "0" 
end if 
intbpn = cint(bpn) 

if request("action") = "1" then 
 word = request("word") 
 url = request("url") 
 if word <> "" then 
  getCategories()   
  if url <> "" then 
   getCategories2() 
  end if 
 end if 
end if 

Function getCategories() 

response.write("<b>'"&word&"' 關(guān)鍵詞在百度搜索排名中,前10位網(wǎng)站!</b><br>") 

on error resume next 
Dim oXMLHTTP  
Dim oCategories  
Dim BodyText 
Dim Pos,Pos1 
Set oXMLHTTP = CreateObject("Microsoft.XMLHTTP") 

oXMLHTTP.open "GET","http://www.baidu.com/baidu?word="&word,False   
oXMLHTTP.send  

 BodyText=oXMLHTTP.responsebody 
 BodyText=BytesToBstr(BodyText,"gb2312") 
 Pos=Instr(BodyText,"<body") 
 pos1=Instr(BodyText,"</body>") 
 BodyText=mid(BodyText,pos,pos1) 

 BodyText=split(BodyText,"<table") 

 st = 5 
 for i = 1 to 10 
   thei = st + i 
  Pos=Instr(BodyText(thei),"<td") 
  pos1=Instr(BodyText(thei),"</td>") 
  Body=mid(BodyText(thei),pos,len(BodyText(thei))-pos) 

  body1=split(body,"<br>") 

  title = body1(0) 
  theurl = body1(2) 
  theurl = replace(theurl,"上的更多結(jié)果","") 
  response.write ("T:"& title) 
  response.write ("<br>") 
  response.write ("U:"& theurl) 
  response.write ("<br><hr>") 
 next 

Set oXMLHTTP = Nothing  
if err.number<>0 then 
response.write "出錯(cuò)了,錯(cuò)誤描述:"&err.description & "<br>錯(cuò)誤來源"& err.source 
response.End() 
end if 
End Function  


Function getCategories2() 
on error resume next 
Dim oXMLHTTP ' As Object 
Dim oCategories ' As Object 
Dim BodyText 
Dim Pos,Pos1 
Set oXMLHTTP = CreateObject("Microsoft.XMLHTTP") 
發(fā)表評論 共有條評論
用戶名: 密碼:
驗(yàn)證碼: 匿名發(fā)表
主站蜘蛛池模板: 绥中县| 元谋县| 巩义市| 绥宁县| 台前县| 磐石市| 巫山县| 宜川县| 高碑店市| 赤壁市| 平远县| 龙山县| 宁远县| 台山市| 行唐县| 眉山市| 全椒县| 花莲市| 两当县| 安远县| 清远市| 姚安县| 唐山市| 桐庐县| 南部县| 钦州市| 嘉黎县| 黑水县| 获嘉县| 莒南县| 来凤县| 尉氏县| 石景山区| 锦屏县| 嵩明县| 宁国市| 保靖县| 潜江市| 新乡县| 淮滨县| 新宾|