I need to make application in PHP which will work in while loop, and listen to connection and if I send signal for stop, it will stop while loop.
For example:
<?PHP
set_time_limit(0);
$i=0;
while ($i <= 2000){
// Listen for connection = Kill signal
// For example:
// if signal is received{
// break;
// }
$i++; // Count
usleep(2000);
}
?>
So if I have web interface with stop button, I wanna be able to stop while loop when I click on that stop button.