Ho sentito dire che si può fare...che cerca solo all'interno del mio sito..restituendo solo valori del mio sito..impaginati con la mia grafica,ecc.ecc.
ma lo script dove sta?
Ho sentito dire che si può fare...che cerca solo all'interno del mio sito..restituendo solo valori del mio sito..impaginati con la mia grafica,ecc.ecc.
ma lo script dove sta?
con questo mi cerca in tutta la rete:
<%
if request.querystring="" then
sendform()
else
sendform()
' You must ask Google for a key
key = "pippo"
' The URL where the script is located
URL = "http://www.miosito.it/"
SoapText = "<?xml version='1.0' encoding='UTF-8'?><SOAP-ENV:Envelope xmlns:SOAP-ENV='http://schemas.xmlsoap.org/soap/envelope/' xmlns:xsi='http://www.w3.org/1999/XMLSchema-instance' xmlns:xsd='http://www.w3.org/1999/XMLSchema'><SOAP-ENV:Body><ns1:doGoogleSearch xmlns:ns1='urn:GoogleSearch' SOAP-ENV:encodingStyle='http://schemas.xmlsoap.org/soap/encoding/'><key xsi:type='xsd:string'>" & key &"</key><q xsi:type='xsd:string'>" & request.querystring("keywords") & "</q><start xsi:type='xsd:int'>" & request.querystring("h") & "</start><maxResults xsi:type='xsd:int'>10</maxResults><filter xsi:type='xsd:boolean'>true</filter><restrict xsi:type='xsd:string'></restrict><safeSearch xsi:type='xsd:boolean'>false</safeSearch><lr xsi:type='xsd:string'></lr> <ie xsi:type='xsd:string'>latin1</ie><oe xsi:type='xsd:string'>latin1</oe></ns1:doGoogleSearch></SOAP-ENV:Body></SOAP-ENV:Envelope>"
Googleurl = "http://api.google.com/search/beta2"
Set objXML = CreateObject("Microsoft.XMLHTTP")
objXML.open "POST",Googleurl,"False"
objXML.setRequestHeader "Man", "POST"+" "+Googleurl+" HTTP/1.1"
objXML.setRequestHeader "MessageType", "CALL"
objXML.setRequestHeader "Content-Type", "text/xml"
objXML.send SoapText
ResponsePage = objXML.responseText
Set objXML = Nothing
ResponsePage=Replace(ResponsePage," xsi:type=" & CHR(34) & "xsd:string" & CHR(34),"")
ResponsePage=Replace(ResponsePage,"<b>","")
ResponsePage=Replace(ResponsePage,"</b>","")
ResponsePage=Replace(ResponsePage,"<br>","
")
EstimatedResults=left(ResponsePage,inStr(ResponseP age,"</estimatedTotalResultsCount>")-1)
EstimatedResults=right(EstimatedResults,len (EstimatedResults)-inStr(EstimatedResults,"<estimatedTotalResultsCoun t")-46)
Response.write ("Estimated results for " & q & ": " & EstimatedResults & " <font size=2>next 10</font><HR>")
public namearray
namearray=split (ResponsePage,"<item xsi:type=" & CHR(34) & "ns1:ResultElement" & CHR(34) & ">")
max=ubound(namearray)-1
for i=1 to max
theurl=left(namearray(i),inStr(namearray(i),"</URL>")-1)
theurl=right(theurl,len (theurl)-instr(theurl,"<URL>")-4)
thetitle=left(namearray(i),inStr(namearray(i),"</title>")-1)
thetitle=right(thetitle,len (thetitle)-inStr(thetitle,"<title>")-6)
if thetitle="" then
thetitle="No Title"
end if
AA=inStr(namearray(i),"</snippet>")-1
thedescription=left(namearray(i),AA)
thedescription=right(thedescription,len (thedescription)-inStr(thedescription,"<snippet>")-8)
Searchresults=Searchresults & "
" & thetitle & "
" & thedescription & "
<font size=2>" & theurl & "</font>"
next
Response.write(Searchresults)
end if
%>
<% Sub SendForm() %>
<form method=get action=<% =request.servervariables("URL") %>>
Find Keywords <input type=text name=keywords size=15>
<input type=hidden name=h value=0> <input type=submit value="Google Search">
</form>
<% end sub%>
ma se volessi cercare solo nel mio sito??
Sul sito di google!Originariamente inviato da ffilogamo
Ho sentito dire che si può fare...che cerca solo all'interno del mio sito..restituendo solo valori del mio sito..impaginati con la mia grafica,ecc.ecc.
ma lo script dove sta?![]()
http://www.google.com/searchcode.html
e questo cosa centra?![]()
Questo è un modulo di ricerca di google da infilare sul tuo sito.Originariamente inviato da ffilogamo
e questo cosa centra?![]()
Se vuoi gestire le ricerche su google diversamente devi usare le API.
ho usato le API con il codice che ho postato sopra.Originariamente inviato da weppos
Questo è un modulo di ricerca di google da infilare sul tuo sito.
Se vuoi gestire le ricerche su google diversamente devi usare le API.
ma vorrei settarlo per fare ricerche nelle pagine del mio sito e non in quelle delle rete.
Sai come posso fare?
Metti site:tuodominio.com davanti alle query.
Sul sito di google trovi tutti i tag per raffinare le ricerche.![]()
puoi indicarmi precisamente dove mettere questo che dici?Originariamente inviato da weppos
Metti site:tuodominio.com davanti alle query.
Sul sito di google trovi tutti i tag per raffinare le ricerche.![]()
Guarda questa ricerca
http://www.google.com/search?q=site%...utf-8&oe=utf-8
E' un esempio di uso di site:nomedominio.com.
E' sufficiente usare la stessa modalità ed aggiungere il prefisso site prima delle chiavi di ricerca.
quindi mi basta mettere il nome del mio sito preceduto dal suffiso site:Originariamente inviato da weppos
Guarda questa ricerca
http://www.google.com/search?q=site%...utf-8&oe=utf-8
E' un esempio di uso di site:nomedominio.com.
E' sufficiente usare la stessa modalità ed aggiungere il prefisso site prima delle chiavi di ricerca.
ma nel codice della pagina dove lo inserisco?