My fwrite to a socket is not flushed, until the socket closes. How to change? I want it to flush after each fwrite.
I\'ve tried:
1) flush()
2) fflush()
There is a function for that! fflush($rc)
Did you make sure you had the correct resource as the parameter?
edit
Okay. looking at your code you are using socket_* functions. You need to use fsockopen, fwrite, fflush, fsockclose. Your code should work the same, but you will be able to flush output. check out the example in the php manual for more details.