Por cierto, lo he estado mirando, y después de ver que lo ha encriptado con el "Windows Script Encoder", no me ha sido muy dificil "desencriptarlo" ;P
Por cierto, como era de esperar, utiliza "Microsoft.XMLHTTP" para "leer" el resultado y mostrar lo que interesa (osea, "robar" literalmente recursos de otra página web, penoso)
Aquí teneis el código fuente del buscador ASP:
Código PHP:
<%@ LANGUAGE = VBScript.Encode %>
<%
'http://google.icq.com/search/results/?q=web+design
'http://google.icq.com/search/results?q=web+design&start=50&sa=N
Dim StrURL
Dim StrHTML
Dim ObjWeather
parametru=Request.QueryString("URL")
if Request.QueryString("q") <> "" then
parametru=Request.QueryString("q")
start=Request.QueryString("start")
StrURL ="http://google.icq.com/search/results/?q="¶metru&"&start="&start
else
StrURL = "http://google.icq.com/search/results/?q="¶metru
'StrURL ="http://www.google.com"
end if
If Not parametru = "" Then
On Error Resume Next
Set lObjWeather = Server.CreateObject ("Microsoft.XMLHTTP")
If Err Then
GetURL = "Error: " & Err.Description
End If
On Error Goto 0
With lObjWeather
.Open "GET", strurl, False, "", ""
.Send
GetURL = .ResponseText
End With
Set LobjWeather = Nothing
strHTML = GetURL
end if
%>
<html>
<head>
<link rel="stylesheet" href="styles.css">
</head>
<BODY>
<FORM>
<INPUT size="50" name="URL" value="<%=parametru%>">
<INPUT type="Submit" value="Search">
</FORM>
<%
scriptname=Request.ServerVariables("SCRIPT_NAME")
If Not parametru= "" Then
strHTML=replace(strHTML,"/search/results/",scriptname)
strHTML=replace(strHTML,"/search/results",scriptname)
strHTML=replace(strHTML,"http://google.icq.com","")
'response.write nrparam
'response.write strHTML
arr=split (strhtml,"class=g",-1,1)
nrp=Ubound(arr)
for j=1 to nrp-1
stringlist=stringlist&arr(j)
next
'testarr=split (stringlist,"table",-1,1)
testarr=split (strhtml,"table",-1,1)
nr=Ubound(testarr)
listeaza="<br"
if nr=4 then
for i=4 to nr-4
listeaza=listeaza&testarr(i)&"table"
next
else
for i=7 to nr-6
trimuit=replace(testarr(i),"http:","")
if len(testarr(i)) <> len(trimuit) and i>2 then
var1="href="&chr(34)&"http://"
var2="target="&chr(34)&"_blank"&chr(34)&" href="&chr(34)&"http://"
valoarematric=replace(testarr(i),var1,var2)
trimuitADV=replace(testarr(i),"div","")
if len(testarr(i)) <> len(trimuitADV) then
valoarematric=""
end if
listeaza=listeaza&valoarematric&"table"
else
listeaza=listeaza&testarr(i)&"table"
end if
next
end if
'response.write nr&"<br>"
response.write listeaza&">"
'response.write stringlist
end if
%>