$site = 'yoursite.com';$port = 80;$check = @fsockopen($site, $port);if (!$check){ echo 'Server is Currently Down!';}else { echo 'Server is Currently Up!';}