Re: re:Timing out an fgets

From: Date: Fri, 18 Aug 2000 06:39:21 +0000
Subject: Re: re:Timing out an fgets
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-12416@lists.php.net to get a copy of this message
jeremy brand wrote: > Another idea: > > You may want to set your file pointer to non-blocking IO. That way > fgets should return even if there is not data. Then you can check if > that is that data you want and handle you error. this is the function > to set non blocking io on file pointers. > > socket_set_blocking() > Thanks , I don't get what the socket descripter is suppose to be is this the variable fsockopen uses? int socket_set_blocking(int socket descripter, int mode) mode 0 = nonblocking - returns straight away mode 1 = blocking - waits for response so it would be : socket_set_blocking($fp, 0); Thanks again, Joseph Blythe

« previous php.general (#12416) next »