Thank you that worked perfectly, I was useing that code to try to debug this code
$fp = fsockopen("127.0.0.1",25);
stream_set_blocking($fp,false);
while (feof($fp) == false){
echo fgets($fp,128);
echo "<br>Still in loop";
}
echo "<br>Out of loop";
fclose($fp);
Will print about a hundred or so Still in loop, tells me feof is never returning true, which would mean Im not reaching the end, I dont understand why, I thought fgets would get any data waiting for me so I can start fputsing more commands?
Its confuseing me.