PHP Online/Offline Code Don't Work

Matthewza

Posting Freak
Apr 20, 2012
777
77
Hello Devbest,

I have made a status page for my Hotel, and it's keep saying it's offline but the Servers Online? and the ip and port are right, Something is blocking it and I don't know what?

Help Please!

is the URL
 

Matthewza

Posting Freak
Apr 20, 2012
777
77
Is telling me it's offline?

ikr? The code is messed up cause the Hotel's Online right now.

If your wondering what's the code here:
PHP:
<br><head><link rel="stylesheet" href="bootstrap/css/bootstrap.css" /><head>
<?php $ip = "IP";
    $port = "PORT";
    if ($sock =! @fsockopen($ip, $port, $num, $error, 5))
    echo '<span class="btn btn-danger"">Offline</span>';
    else{
        echo '<span class="btn btn-success"">Online</span>';
    }  ?>
 

Users who are viewing this thread

Top