
23/01/2008, 06:42
|
 | | | Fecha de Ingreso: julio-2002 Ubicación: Rio Gallegos - Santa Cruz
Mensajes: 893
Antigüedad: 22 años, 9 meses Puntos: 1 | |
Re: ayuda con buscador convinado
Código:
for j=0 to spellingmax
if inStr(keywords,spellingarray(j))=0 then
Spellingitalic=replace(Spellingitalic,spellingarray(j),"<b><i>"&spellingarray(j)&"</i></b>")
end if
next
ResponsePage=Replace(ResponsePage," xsi:type=" & CHR(34) & "xsd:string" & CHR(34),"")
ResponsePage=Replace(ResponsePage,"<b>","<b>")
ResponsePage=Replace(ResponsePage,"</b>","</b>")
ResponsePage=Replace(ResponsePage,"<br>","<br>")
EstimatedResults=left(ResponsePage,inStr(ResponsePage,"</estimatedTotalResultsCount>")-1)
EstimatedResults=right(EstimatedResults,len (EstimatedResults)-inStr(EstimatedResults,"<estimatedTotalResultsCount")-46)
EstimatedResults=Ccur(EstimatedResults)
StartResults=left(ResponsePage,inStr(ResponsePage,"</startIndex>")-1)
StartResults=right(StartResults,len (StartResults)-inStr(StartResults,"<startIndex")-30)
StopResults=left(ResponsePage,inStr(ResponsePage,"</endIndex>")-1)
StopResults=right(StopResults,len (StopResults)-inStr(StopResults,"<endIndex")-28)
SearchTime=left(ResponsePage,inStr(ResponsePage,"</searchTime>")-1)
SearchTime=right(SearchTime,len (SearchTime)-inStr(SearchTime,"<searchTime")-33)
SearchTime=left(SearchTime,len (SearchTime)-inStr(SearchTime,".")-2)
%>
<hr>
Página <b><%if request.querystring("h")=0 then%>1<%else%><%=left(request.querystring("h"),len(request.querystring("h"))-1)+1%></b><%end if%></b>
- Resultados <b><%=StartResults%> - <%=StopResults%></b> de aproximadamente <b><%= EstimatedResults %></b> para <b><%= request.querystring("keywords") %></b><%if opc="web" then%> dentro de <b><%=web%></b><%end if%> (<%=SearchTime%> segundos)
<hr><br>
<%if Spelling<>"" then%>
¿Quiso decir? <a href="<%= request.servervariables("URL") %>?keywords=<%= Spelling %>&h=0<%if opc<>"all" then%>&opc=<%=opc%><%end if%>"><%=Spellingitalic%></a><br><br>
<%end if%>
<%
public namearray
namearray=split (ResponsePage,"<item xsi:type=" & CHR(34) & "ns1:ResultElement" & CHR(34) & ">")
max=ubound(namearray)
for i=1 to max
theurl=left(namearray(i),inStr(namearray(i),"</URL>")-1)
theurl=right(theurl,len (theurl)-instr(theurl,"<URL>")-4)
if inStr(right(theurl,len(theurl)-6),"pdf") then
tipo="pdf"
else
tipo="web"
end if
thetitle=left(namearray(i),inStr(namearray(i),"</title>")-1)
thetitle=right(thetitle,len (thetitle)-inStr(thetitle,"<title>")-6)
thetitle=Replace(thetitle, "&", "&")
if thetitle="" then
thetitle=left(namearray(i),inStr(namearray(i),"</directoryTitle>")-1)
thetitle=right(thetitle,len (thetitle)-inStr(thetitle,"<directoryTitle>")-15)
thetitle=Replace(thetitle, "&", "&")
end if
if thetitle="" then
thetitle="SIN TITULO"
end if
thedescription=left(namearray(i),inStr(namearray(i),"</snippet>")-1)
thedescription=right(thedescription,len (thedescription)-inStr(thedescription,"<snippet>")-8)
thedescription=Replace(thedescription, "&", "&")
if thedescription = "" then
thedescription=left(namearray(i),inStr(namearray(i),"</summary>")-1)
thedescription=right(thedescription,len (thedescription)-inStr(thedescription,"<summary>")-8)
thedescription=Replace(thedescription, "&", "&")
end if
thesize=left(namearray(i),inStr(namearray(i),"</cachedSize>")-1)
thesize=right(thesize,len (thesize)-instr(thesize,"<cachedSize>")-11)
if tipo="pdf" then%><sup>[PDF] </sup><%end if%><a href="<%=theurl%>" target="_blank"><u><%=thetitle%></u></a><br>
<%=thedescription%><br>
<%=theurl%><%if thesize<>"" then%> - <%=thesize%><%end if%> - <a href="http://www.google.com/search?q=cache:<%=theurl%>" target="_blank">En caché</a> - <a href="http://www.google.com/search?q=related:<%=theurl%>" target="_blank">Páginas similares</a><br><br>
<% next
end if %>
</form>
<%If EstimatedResults > maxResults then
keywordsstr=request.querystring("keywords")
keywordsstr=Replace(keywordsstr,CHR(34),"%22")%>
<hr>
<p align="center">
<table border="0" cellspacing="0" style="text-align: center">
<tr>
<%If request.querystring("h") >= 10 Then%>
<td width="8">
<table border="0" cellspacing="1" bgcolor="#ffffff">
<tr>
<td class="numero"><a href="<%= request.servervariables("URL") %>?keywords=<%= keywordsstr %>&h=<%= request.querystring("h")-10 %><%if opc<>"all" then%>&opc=<%=opc%><%end if%>" class="numero">
<<ANTERIOR</a></td>
</tr>
</table>
</td>
<%end if%>
<%If Ccur(Request.QueryString("h"))+10 < EstimatedResults Then%>
<td width="1">
<table border="0" cellspacing="1" bgcolor="#ffffff">
<tr>
<td class="numero"><a href="<%= request.servervariables("URL") %>?keywords=<%= keywordsstr %>&h=<%= request.querystring("h")+10 %><%if opc<>"all" then%>&opc=<%=opc%><%end if%>" class="numero">
SIGUIENTE>></a></td>
</tr>
</table>
</td>
<%End If%>
</tr>
</table>
</p>
<%end if
end if%>
__________________ ---->Sin ayuda no se llega a ningun lado<---- Virla |