|
Posted by matt VanDeWalle on 10/01/05 21:49
hello all,
I have noticed on this server/talk/chat I am trying to write, that when i
or another user logs on, right away, it will go to the if statement in my
chat handling function, that says something to the affect of /* something
entered but not a . */
if(($words[0] != '.' ) && count($words) == 1)
{
socket_write($sock, "$user said $words[0]");
}
/* end of if */
and when i log on, it will automatically hit that last if statement like
there is something still in the buffer and it seems to be a blank space or
maybe its a new line or something, but I have ob_implicit_flush(); called
before any of the code but shouldnt that take care of all buffers, or just
the output buffer?
if so, how do I make sure the "input buffer" is emptied every time
i think this is the reason I am having a problem with new variables not
being filled with anything, the code doesn't even wait, it apparently is
some big code problem on my part or i just need to somehow clear the input
buffer, which i assume is just stdin,
do i need something like flush($sock); or did i just hit the nail on the
head with that question
matt
Navigation:
[Reply to this message]
|