01hanstu Posted January 16, 2010 Share Posted January 16, 2010 Hi, I have some code [below] running when the page loads. The code is meant to detect if the servers are on/off line. What I want to do it have loading bar (or animated gif) running until the page has completed its checks /loading as I am checking about 10 servers in our company. The code it: <? $ip = "SERVER_NAME"; $port = "80"; if (! $socksr01 = @fsockopen($ip, $port, $num, $error, 5)) echo '<B><FONT COLOR=red>Offline</b></FONT>'; else{ echo '<B><FONT COLOR=lime>Online</b></FONT>'; fclose($socksr01); } ?> I know this code takes a while and the staff I work with just can't be bothered working. Please Advise Stuart 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.