Just a simple snippet with socks to scan for torrents
alias tsearch {
set %tser $replacex($1-,$chr(32),$chr(43))
sockopen tor www.torrentman.com 80
}
on *:sockopen:tor:{
sockwrite -n tor GET /search.php?op=0&search= $+ %tser
sockwrite -n tor Host: www.torrentman.com
sockwrite -n tor $crlf
}
on *:sockread:tor:{
if (!$window(@Torrents)) window -m @Torrents
else {
clear @Torrents
}
sockread %r
tokenize 32 %r
if (*<td class="left">* iswm %r) {
if ($regex($4-,/(/.+\d)"/g)) {
set %lol $regml(1)
}
if ($regex($4-,/(\d+)/g)) {
echo @Torrents 4Torrent:12 $remove($4-,href="/tor.php?id= $+ $regml(1) $+ ">,</a>,</td>) 4Link:12 $+(www.torrentman.com,%lol)
}
}
}
else {
echo @Torrents No Torrents Found For KeyWord: $replacex(%tser,$chr(43),$chr(32))
}
on *:sockclose:tor:{
unset %lol,%r
}