simonp Posted October 25, 2008 Share Posted October 25, 2008 Hi folks, I have some code that checks if a server is online. I want the code to check continually (ie every 1 second) - I know I could use a meta refresh but that's a bit clunky. Is there a way I can setup a loop around the code that would do it more cleanly that meta refresh? Hope this makes sense and someone can help! Cheers Simon Quote Link to comment Share on other sites More sharing options...
dezkit Posted October 25, 2008 Share Posted October 25, 2008 AJAX Quote Link to comment Share on other sites More sharing options...
simonp Posted October 25, 2008 Author Share Posted October 25, 2008 Thanks - but that really doesn't help much! Can you expand? Quote Link to comment Share on other sites More sharing options...
dezkit Posted October 25, 2008 Share Posted October 25, 2008 See the post magnificent post below Quote Link to comment Share on other sites More sharing options...
genericnumber1 Posted October 25, 2008 Share Posted October 25, 2008 Nah, AJAX isn't a scripting language it's a programming technique... that said: You could use AJAX good sir! It is "a way of including content in a web page in which javascript code in the web page fetches some data from a server and displays it without re-fetching the entire page at the same time, hence the term 'Asynchronous'." It's really hard to elaborate other than to tell you to use AJAX because it would be a lot of code to write. Google some tutorials on AJAX techniques. You'd just use javascript to retrieve the server statuses from a separate php script and then update the page the user is viewing with the result of the request. Quote Link to comment Share on other sites More sharing options...
simonp Posted October 25, 2008 Author Share Posted October 25, 2008 ok - thanks guys - i'll do some googling. cheers simon Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.