Is it hosted on webhosting?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!
You must be registered for see linksis the URL
Is it hosted on webhosting?
Check the Terms of Service of the webhosting, I know many webhostings is blocking port scanning.
PHP code?
<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="label label-important">Offline</span>';
else{
echo '<span class="label label-success">Online</span>';
fclose($sock);
} ?>
<?php $ip = "IP";
$port = "PORT";
if ($sock != @fsockopen($ip, $port, $num, $error, 5))
echo '<span class="label label-important">Offline</span>';
else{
echo '<span class="label label-success">Online</span>';
fclose($sock);
} ?>
That's working code, unlike yours.
<head><link rel="stylesheet" href="bootstrap/css/bootstrap.css" /><head>
Change
Code:class="label label-important"
to
Code:class="btn btn-danger"
and
Code:class="label label-success"
to
Code:class="btn btn-success"
Worked Thanks
Omg, I'm having trouble again with the stupid Status crap. LookYou must be registered for see linksI turned off the Hotel to test if it works and it doesn't? it says it's Online but really it's Offline.
it was probably your cache
No, it's Online. I tried changing ports to see if it was my ports but it wasn't ....