NabillaGustiviana Posted August 22, 2013 Share Posted August 22, 2013 I want to make machine monitoring system between 2 PC. This system indicate machine ON or OFF. In the page in 1st PC, there is button to switch machine between ON or OFF. And the 2nd PC show the condition from 1st PC (there are no button to switch machine's condition, it's just display). My question, how to make the 2nd PC get the real time action from 1st PC? Is it possible?Anyone have suggestion?Thank You Link to comment Share on other sites More sharing options...
thescientist Posted August 22, 2013 Share Posted August 22, 2013 One way could be to have a webserver running on both machines, and then have JS make an AJAX request to a proxy script running on that machines webserver, that makes an HTTP request to and endpoint on the other machine, and if the response comes back as 200, you can assume the other machine is up and running. You can then update the UI of the machine making the request accordingly. A proxy script could be a simple PHP script that just makes a cURL request and returns the response status, or whatever you want to pass back to the AJAX request, to determine success or failure. Link to comment Share on other sites More sharing options...
davej Posted August 23, 2013 Share Posted August 23, 2013 (edited) If the pc's have fixed IP addresses they should be able to ping each other with a dos script. If you wanted to use javascript then I don't think you could do it without making both pc's into servers. Edited August 23, 2013 by davej Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now