Playing With Google's Search Engine - Posted (1208 Views)
Advanced Member
Carefree
Posts: 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
%>
<
 Sort direction, for dates DESC means newest first  
 Page size 
Posted
Senior Member
MarkJH
Posts: 1722
1722
http://www.googlewhack.com/ smile<
Bandlink.net - http://www.bandlink.net/
Bandlink Music Forums - http://www.bandlink.net/forum/
Posted
Support Moderator
Shaggy
Posts: 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.”
 
You Must enter a message