On 10/8/07, David Peters <[EMAIL PROTECTED]> 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

Reply via email to