Jump to content

[SOLVED] Server Status


SkyRanger

Recommended Posts

I am trying to create a script to check a server status based on IP and Port number.  I know the server is up because I tested it first to make sure, but when I check it in my script it says it is offline.  Not sure what the problem is, or if I am even doing this right

 

<?php
$gameserver = '64.182.161.102:27033';
if (preg_match ("/^[a-z0-9][a-z0-9\-]+[a-z0-9](\.[a-z]{2,4})+$/i", $gameserver)) {
    print "$gameserver is currently online.";
} else {
    print "$gameserver is currently offline!";
}
?>

Link to comment
https://forums.phpfreaks.com/topic/53997-solved-server-status/
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.