Re: PHP loop control

From: Date: Mon, 08 Oct 2007 20:18:32 +0000
Subject: Re: PHP loop control
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-262935@lists.php.net to get a copy of this message
On 10/8/07, David Peters <davidp@matrixpd.com> wrote: > > I'm looking for some ideas on the best way to perform the following. > 1. Give the user a webpage that allows him/her to start/stop a loop. > 2. Open a socket to a device. > 3. Issue commands to the device a read the results. > 4. Process the results. > 5. If the user selected 'Stop', exit the loop or go to #3 above. > 6. Close socket. > > Is this type of loop possible in PHP? What is the best way to do this > type > of loop control? Are there examples out there? It seems to me that > starting an infinite loop would cause some problems trying to read the > user's selection to stop the process. > just make sure the code that handles user requests has access to the loop control variable. that way a user will be able to terminate the loop. -nathan

« previous php.general (#262935) next »