Currently I have a setInterval javascript function which calls an ajax function to call a php script. This php script is a server that is waiting for a request from a client being run by another program. The client will send a String whenever there are changes made and this string is to be echoed back through ajax.
setInterval(function(){getTopo()}, 2000);
getTopo()
is a $.ajax calling server.php
I want to terminate the server.php file if there is no reply within 2 secs before running getTopo() again.
Else can I output through ajax an echo in the php's while loop?
No comments:
Post a Comment