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

首頁 > 編程 > ASP > 正文

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

2024-05-04 11:01:58
字體:
供稿:網(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ā)表
主站蜘蛛池模板: 株洲县| 金坛市| 浮梁县| 冕宁县| 桐柏县| 天水市| 承德市| 衡山县| 襄汾县| 林西县| 邹平县| 电白县| 蒙自县| 寿阳县| 灯塔市| 巴彦淖尔市| 荥阳市| 大城县| 湟源县| 保山市| 黄陵县| 阜阳市| 麟游县| 龙口市| 桃园市| 东台市| 嘉鱼县| 克拉玛依市| 德昌县| 长沙县| 新郑市| 怀宁县| 东海县| 福泉市| 六枝特区| 南乐县| 石嘴山市| 福安市| 聂拉木县| 平顶山市| 新疆|