Jump to content

php loading


01hanstu

Recommended Posts

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

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.