I have a JavaScript functions which calls a PHP function through AJAX.
The PHP function has a set_time_limit(0)
for its purposes.
Is there any way to stop that function when I want, for example with an HTML button event?
I want to explain better the situation: I have a php file which uses a stream_copy_to_stream($src, $dest) php function to retrieve a stream in my local network. The function has to work until I want: I can stop it at the end of the stream or when I want. So I can use a button to start and a button to stop. The problem is the new instance created by the ajax call, in fact I can't work on it because it is not the function that is recording but it is another instance. I tried MireSVK's suggest but it doesn't worked!