Playing With Google's Search Engine - Postet den (1210 Views)
Advanced Member
Carefree
Innlegg: 4224
4224
Ever want to just look up random words in a search engine to see whether any page on the net has them all? I was bored, so I wrote a little routine to use a dictionary database & auto-search Google. It uses the dictionary database from Atomic's spell-checker mod.
Basically, put the dictionary & the asp file in the same directory, run the file, done. I have it creating 20 different searches - if you want to change it, feel free.
Code:

<%
strConnString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=dictionary2000.mdb"
For y = 1 to 20 'Number of searches to create
strLst="%2B"
for x = 1 to 5 'Number of words per search
Randomize
q=int(Rnd*113808)
set my_Conn = Server.CreateObject("ADODB.Connection")
my_Conn.Open strConnString
strSql="SELECT WORD FROM DICTIONARY WHERE id=" & q
set rsDict = my_conn.Execute(strSql)
strLst=strLst&rsDict("Word") & " %2B"
next
for x = 1 to 5 'Add in a 5-letter word with random characters
Randomize
q=(Rnd*26)
strAlp="abcdefghijklmnopqrstuvwxyz"
strLst=strLst&mid(strAlp,q,1)
Next
strLst=strLst&" -dictionary -wordlist"
url="http://www.google.com/search?hl=en&q="""&strLst&"""&btnG=Search"
Response.Write("<script>" & vbCrLf)
Response.Write("window.open('" & url & "');" & vbCrLf)
Response.Write("</script>")
next
%>
<
   
 Sidestørrelse 
Postet den
Senior Member
MarkJH
Innlegg: 1722
1722
http://www.googlewhack.com/ smile<
Bandlink.net - http://www.bandlink.net/
Bandlink Music Forums - http://www.bandlink.net/forum/
Postet den
Support Moderator
Shaggy
Innlegg: 6780
6780
[Link]
<
Search is your friend “I was having a mildly paranoid day, mostly due to the
fact that the mad priest lady from over the river had
taken to nailing weasels to my front door again.”
 
Du må legge inn en melding