Im basicly starting a small msgr server on my website, I have mIRC listen for connections, once my website opens on the site, a socket is created and a 2-way connection is established. The problem is that the PHP script wont echo the sockread until the socket-link is closed. I've made the code as short as I can, anyone know how to have the sockread update in real-time?
$socket = fsockopen ("IP", "PORT");
$initial_send="ESTABLISHED";
fputs ($socket, $initial_send . "\r\n");
while (!feof($socket)) {
$incoming = fgets($socket, 1024);
echo "" . $incoming . "\n";
}