Skip to content

Instantly share code, notes, and snippets.

@acidtib
Created February 19, 2012 21:32
Show Gist options
  • Save acidtib/1865914 to your computer and use it in GitHub Desktop.
Save acidtib/1865914 to your computer and use it in GitHub Desktop.
Check if wow server is running
<?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";
    }
}
?>
@acidtib
Copy link
Author

acidtib commented Feb 19, 2012

test is and let me know if it works

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment