alias findu {
if ($sock(findu)) sockclose findu
sockopen findu www.buzzen.com 80
sockmark findu $$1
}
on *:SOCKOPEN:findu: {
var %nick = $sock($sockname).mark
sockwrite -n $sockname GET /chat/friend.php?nick= $+ %nick HTTP/1.1 $+ $crlf $+ Host: www.buzzen.com $+ $crlf $+ Cookie: lang=EN $+ $str($crlf, 2)
}
on *:SOCKREAD:findu: {
var %read
sockread %read
if (*valign=up* iswm %read) echo -a %read
}
im trying to grab the table from the page to show all the users and their rooms. at the moment im checking if it finds *valign* but it just echos line to long.
can someone help me parse the socket data and echo the names/rooms?
If the html lines are too long, you'll need to use binary variables/commands for dealing with them. If you do a search for "sockopen bread" (no quotes), you can probably find examples of how to do it. I don't use binary for anything, so I can't really help.
Thanks hixxy, it does echo something, but i'm a bit unsure. any idea how I could make it echo all the valign=up entries
because each nickname in the table has a new 'valign=up' so i thought maybe parsing a loop to search for all the valign=up's and echo the nicknames rooms but im a bit unsure