ASP crawl Bing included and reverse code
<%
Response.Expires =-1
Response.AddHeader "Cache-control", "No-cache"
Response.AddHeader "Pragma", "No-cache"
Wd=request ("D")
If Request ("s") = "bings" Then
bingurl= "http://" cn.bing.com/search?q=link%3a "&wd&" &form=qblh&filt=all "
Else
Bingurl=" http://cn.bing.com/ search?q=site%3a "&wd&" &form=qblh&filt=all
End If
tempstr= gethttppage (bingurl)
Dim Bingwebsite
Set reg=new Regexp
Reg. Multiline=true
Reg. Global=flase
Reg. Ignorecase=true
Reg. pattern= "Strip result, total (. | N) *?) Bar
Set matches = Reg.execute (TEMPSTR)
for each match1 in matches
Bingwebsite=match1. Value
Next
Set matches = Nothing
Set reg = Nothing
Bingwebsite=replace (bingwebsite, "bar result, Total", "")
Bingwe Bsite=replace (Bingwebsite, "bar", "")
Bingwebsite=replace (Bingwebsite, "", "")
Bingwebsite=replace (bingwebsite , ",", "")
Bingwebsite=replace (Bingwebsite, "", "")
If bingwebsite= "" Then
If Request ("s") = "Bings" Then
Response.Write ("Document.Write" ("<a href= ' Http://cn.bing.com/search?q=link%3A" &wd& "&FORM=QBLH") &filt=all ' target= ' _blank ' title= ' data acquisition error, please requery later! & #10, lply Studio. COM ' ><font color= #999999 ><b>x</b></font></a> ");")
Else
Response.Write ("Document.Write" ("<a href= ' hhttp://cn.bing.com/search?q=site%3a" &wd& "&FORM=QBLH") &filt=all ' target= ' _blank ' title= ' data acquisition error, please requery later! & #10, lply Studio. COM ' ><font color= #999999 ><b>x</b></font></a> ");")
End If
Else
If Request ("s") = "Bings" Then
Response.Write ("Document.Write" ("<a href= ' Http://cn.bing.com/search?q=link%3A" &wd& "&FORM=QBLH") &filt=all ' target= ' _blank ' title= ' "&bingWebSite&" & #10; " &wd& "' Rel=nofollow class=ln>" &bingWebSite& "</a>"); "
Else
Response.Write ("Document.Write" ("<a href= ' Http://cn.bing.com/search?q=site%3A" &wd& "&FORM=QBLH") &filt=all ' target= ' _blank ' title= ' "&bingWebSite&" & #10; " &wd& "' Rel=nofollow class=ln>" &bingWebSite& "</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
& nbsp; 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
objstream. Mode =3
objstream. Open
objstream. Write body
objstream. Position = 0
objstream. Type = 2
objstream. Charset = Cset
bytestobstr = objstream. ReadText
objstream. Close
Set objstream = no
end Function
%>