yep but you should put this code on sockopen event
if ($sockerr) {
echo -s error $sockname $sockerr $sock($sockname).wsmsg
halt
}
also
it s not necessary because when $sockbr is 0 sockread will stop automaticly..
here is wrong;
tokenize 32 %r
if stuff here..
sockread %r
u should use tokenize command after sockread command u can't tokenize unripe %variable. Like this ;
sockread %r
tokenize 32 %r
if stuff here..
i couldn't see other problem
i hope it ll work..