Created
February 19, 2012 21:32
-
-
Save acidtib/1865914 to your computer and use it in GitHub Desktop.
Check if wow server is running
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$host = '173.192.81.52'; | |
$ports = array(8085); | |
foreach ($ports as $port) | |
{ | |
$connection = @fsockopen($host, $port); | |
if (is_resource($connection)) | |
{ | |
echo '<h2>' . $host . ':' . $port . ' ' . '(' . getservbyport($port, 'tcp') . ') is open.</h2>' . "\n"; | |
fclose($connection); | |
} | |
else | |
{ | |
echo '<h2>' . $host . ':' . $port . ' is not responding.</h2>' . "\n"; | |
} | |
} | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
test is and let me know if it works