Results 1 to 2 of 2
Hi everyone, I found loads of stuff out there to help me create a daemon in C, PHP or Python and I would like to get some advice on the ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
- 03-06-2011 #1
- Join Date
- Mar 2011
I found loads of stuff out there to help me create a daemon in C, PHP or Python and I would like to get some advice on the best solution to select for my specific goal.
So I'm looking for a way to tell the distant client from my editor or from the command line that it should reload the page.
What should this script call ? A PHP script run as a daemon that has a kind of event handler waiting also for the command to be sent or daemon written in C, in Python ?
What do you think
Thanks in advance
- 03-07-2011 #2
I think that AJAX is the correct solution (you certainly need some sort of JS), but you will not be communicating with a daemon. You will be communicating with a web server. The web server will handle the daemon part of the problem.
So the real part of the problem is how to write a PHP/Perl/Rails/etc. page that your AJAX can call and which will return when you tell it to. You can use pretty much any language for this, and your code can be as simple as checking for the existence of a file, and when that file exists, remove it and return.