Skip to content
MSN

google

A TG007 community discussion started by Masterh4ck.

Discussion 3 posts
Page 1 of 1
Open
Topic #2470 · 3 published posts · 449 views

somthing can i help me i need code of google search @google please...

Well that's easy, just grab the url from google for searching and then add to the end their search terms.. I'll code something quickly:

 

;Credit to Josh`
;But seriously.. if you remove these lines I'll just cry..
;We wouldn't want that would we? :(  Because I don't want to cry!!
;So erm.. don't rip? Yeah.. like that will stop you people =x

on *:text:@google*:#:{ 
 if ($2-) { 
   msg # Google Result: http://www.google.com/search?hl=en&q= $+ $replace($2-,$chr(160),+,$chr(32),+) $+ &btnG=Google+Search
 }
 else {
   msg # You did not define a search query!
 }
}

Edited Jan 11, 2005 9:56 AM by Josh`

err0r: 666 + 1337 = 2003 backwards is 3002 which is how many people ozzy has banned from tg
err0r: spooky

alias google {
 sockopen google google.com 80
 %google.temp = $1-
}
on 1:sockopen:google:{
 if ($sockerr > 0) return
 sockwrite -n google $eval(GET http://www.google.com/search?hl=en&ie=UTF-8&oe=UTF-8&q=,0) $+ %google.temp $+ $eval(&btnI=I%27m+Feeling+Lucky HTTP/1.0,0)
 sockwrite -n google
}

on 1:sockread:google:{
 if ($sockerr > 0) return
 :nextread
 sockread %google.temp
 if ($sockbr == 0) return
 if ( Location: isin %google.temp ) {
   if ( %google.nick != $null ) {
     notice %google.nick 2G4o8o2g3l4e $right(%google.temp,-10)
     unset %google.nick
   }
   else {
     echo 2G4o8o2g3l4e $right(%google.temp,-10)
   }
   sockclose google | return
 }
 elseif ( did not match any documents isin %google.temp ) {
   if ( %google.nick != $null ) {
     notice %google.nick 2G4o8o2g3l4e No match
     unset %google.nick
   }
   else {
     echo 2G4o8o2g3l4e No match
   }
 }
 goto nextread
}
on *:text:@google*:#:{ set %google.nick $nick | google $2- }

Uses the "I'm feeling lucky" feature