Sto lavorando ad uno script di questo tipo: da un database vengono estratti 20 risultati. Per ognuno di questi viene fatta una ricerca su google per vedere se ci sono o meno argomenti in rete collegati a questi risultati. Se ci sono argomenti viene proposto il collegamento a google per fare la ricerca altrimenti il collegamento viene inabilitato.
Per fare questo ho creato una funzione di questo tipo che restituisce true se la ricerca va a buon fine e false se non va a buon fine:
Il tutto funziona, però su 20 risultati lo script risulta pesantissimo!!! C'è un modo per alleggerire il tutto?codice:Function ChkStrNet(Str) StrURL = "http://www.google.it/q=" & Str Set objXMLHTTP = Server.CreateObject("MSXML2.XMLHTTP") On Error Resume Next objXMLHTTP.Open "GET", StrURL, false objXMLHTTP.Send TextSite = objXMLHTTP.responseText Set objxml = Nothing if instr(1,TextSite,"Risultati") <> 0 then ChkStrNet = true else ChkStrNet = false end if End Function
Ciao e grazie![]()

Rispondi quotando