/ Published in: PHP
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
<? # Domain Name $domainName = "http://www.symfony-projects.org" ; # Function function DomainCheck($domainName){ $serverStatus = 0; # Control Structure if (!$openDomain) $serverStatus = -1; else { $status = ($finishTime - $startTime) * 1000; } return $serverStatus; } # Server Status $serverStatus = DomainCheck($domainName); # Result if ($serverStatus != -1) { echo "Server is OFF right now" ; } else { echo "Server is ON; everyhing is OK." ; } ?>