I have done this but it does not seem to ever get to the end of file, I have it inserting the values into the database, it goes for awhile around 12 to 24 hours and then stops inserting the values into the database and I have to restart the script...
Randy
-------Original Message-------
Date: Wednesday, August 13, 2003 10:02:15 PM
Subject: Re: [PHP] php conditional loop question
On Wed, Aug 13, 2003 at 09:51:39PM -0400, Randy L Johnson Jr wrote:
>
> I have a function that makes a connection to a live datafeed website and
> downloads data via a pfsockopen() statement. After awhile the data stops
> feeding but the connection stays open. when the data stops I want to exit
> out of the function and have the function run again
Pseudo code...
while (1) {
pfsockopen(... blah blah ...);
while (not end of file) {
get the line and do what you want with it...
}
}
--Dan
--
FREE scripts that make web and database programming easier
T H E A N A L Y S I S A N D S O L U T I O N S C O M P A N Y
4015 7th Ave #4AJ, Brooklyn NY v: 718-854-0335 f: 718-854-0409
--
. |