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 Link to comment https://forums.phpfreaks.com/topic/188726-php-loading/ Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.