Paste this into Tools -> Script Editor -> Remote
and Save it.
Now search with: /search sbx
alias search {
sockclose http
sockopen http www.jkdf2.net 80
set %theSearch $1-
set %q $replace($1-, $chr(32), $chr(37) $+ $chr(50) $+ $chr(48))
echo -a -----------------------------
echo -a Searching jkdf2.net for %theSearch $+ ...
}
on *:SOCKOPEN:http: {
sockwrite -n $sockname GET /mircSearch.php?q= $+ %q HTTP/1.1
sockwrite -n $sockname Host: www.jkdf2.net
sockwrite $sockname $crlf
}
on *:SOCKCLOSE:http: {
tokenize 124 %theResults | set %maxTokes $0
var %i = 1
var %results 0
:top
if (%i <= %maxTokes) {
%bits = $gettok(%theResults, %i, 124)
if ($gettok(%bits, 1, 44) == 0) {
echo -a 4Type: $gettok(%bits, 2, 44) 4Name: $gettok(%bits, 3, 44) 4Download: 12 $+ $gettok(%bits, 4, 44)
%results = $calc(%results + 1)
}
%i = $calc(%i + 1)
goto top
}
echo -a Search Results for $chr(34) $+ %theSearch $+ $chr(34) $+ : %results
echo -a -----------------------------
unset %q
unset %theSearch
unset %sendToChan
unset %theResults
}
on *:SOCKREAD:http: {
if ($sockerr > 0) {
echo -a Socket Error
return
}
:nextread
sockread -f %temp
if ($sockbr == 0) return
if (%temp) {
%theResults = %theResults $+ %temp
}
goto nextread
}
Topic starter
Posted : 18/04/2015 4:44 am
