I’m making a PHP IRC Bot, and it works great.
What I want to do though, is to have a live debugging option, which means I need to see the commands sent from an operator to the bot live. The problem is, as long as the bot’s running, no output is being sent, even if I echo, printf, or var_dump.
So my question is, how can I force PHP to send the current output buffer without waiting for the logic to finish (because theoretically, it won’t finish ever :P)
EDIT:
flush() or ob_flush() doesn’t seem to work, see this simple example: http://codepad.viper-7.com/ks7zEy
use flush();