ok. This is probably simple but I am not thinking straight. Here is what
I want to do
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 stop
I think you need to set the connection to nonblocking mode. Use
bool stream_set_blocking ( resource stream, int mode)
Then if no data is available for a longer time (it's up to you), you can
break out of the loop and do something else.
Randy L Johnson Jr wrote:
I am running php as a clie
* Thus wrote Randy L Johnson Jr ([EMAIL PROTECTED]):
>
> I have the program downloading the data and all that so I don't need help
> with that. I just want to be able to reun the function if the data stops
> or in more general a certain condition is met.
I'm not entirely sure how you are readin
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 exi
---
From: Analysis & Solutions
Date: Wednesday, August 13, 2003 10:02:15 PM
To: PHP List
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
&
* Thus wrote Randy L Johnson Jr ([EMAIL PROTECTED]):
> 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 t
I am running php as a client and I have the script running 24/7 to download the data from the connection. Is there a function to see if the connection drops. ??
is there a way to keep restart the function in the script. perhaps use a while and exit the function with a number
7 matches
Mail list logo