Hi,
Im having a problem with an (apparently) simple little script, which is
designed to log on to a POP3 server and list the number of emails. I can log
in with username and password, and can relay the server echos back to the
page, but run into problems when I attempt to set up a while loop to read
more than one line of repsonse from the server.
My code looks like this:
fputs ($server_connec t, "LIST \n\n");
while (!feof($server_ connect)) {
echo fgets ($server_connec t,255);
echo "<br>";
}
fclose ($server_connec t);
$server_connect is an instance of the fsockopen() function. I keep getting
the appropirate output from this code, but only once the page has timed out!
Does anyone know how I could go about fixing this, so that I capture all
output from the server, but dont have to wait for a timeout to see the data.
Thanks.
Im having a problem with an (apparently) simple little script, which is
designed to log on to a POP3 server and list the number of emails. I can log
in with username and password, and can relay the server echos back to the
page, but run into problems when I attempt to set up a while loop to read
more than one line of repsonse from the server.
My code looks like this:
fputs ($server_connec t, "LIST \n\n");
while (!feof($server_ connect)) {
echo fgets ($server_connec t,255);
echo "<br>";
}
fclose ($server_connec t);
$server_connect is an instance of the fsockopen() function. I keep getting
the appropirate output from this code, but only once the page has timed out!
Does anyone know how I could go about fixing this, so that I capture all
output from the server, but dont have to wait for a timeout to see the data.
Thanks.
Comment