Quote
gsp_panel/gsp_panel.php
fsockopen() [<a href='function.fsockopen'>function.fsockopen</a>]: unable to connect to 204.2.139.20:80 (Connection timed out) Line: 21
<?php
/*-------------------------------------------------------+
| PHPFusion Content Management System
| Copyright © 2002 - 2011 Nick Jones
| http://www.php-fusion.co.uk/
+--------------------------------------------------------+
| Filename: gsp_panel.php
| CVS Version: 1.00
| Author: Chris "sobe" Johnson
+--------------------------------------------------------+
| This program is released as free software under the
| Affero GPL license. You can redistribute it and/or
| modify it under the terms of this license which you
| can read by viewing the included agpl.txt or online
| at www.gnu.org/licenses/agpl.html. Removal of this
| copyright header is strictly prohibited without
| written permission from the original author(s).
+--------------------------------------------------------*/
if (!defined("IN_FUSION")) { die("Access Denied"); }
function serverstatus($server, $port) {
$up = @fsockopen($server, $port, $errno, $errstr, 1);
if(!$up) {
return "<font color=\"red\">Offline</font>";
} else{
return "<font color=\"green\">Online</font>";
}
fclose($up);
}
openside("Server Status");
$nagastatus = serverstatus("173.245.92.162", 4514);
echo "<div><p style='float: left'>Naga </p><p style='float: right'> " . $nagastatus;
echo "</p></div>";
$loginstatus = serverstatus("173.245.92.120", 4500);
echo "<br /><div style='clear: both;'><p style='float: left'>Login </p><p style='float: right'>" . $loginstatus;
echo "</p></div>";
$patchstatus = serverstatus("204.2.139.20", 80);
echo "<br /><div style='clear: both;'><p style='float: left'>Patch </p><p style='float: right'>" . $patchstatus;
echo "</p></div>";
closeside();
// opentable("Center panel");
// closetable();
?>
Quote
try( fsockopen() )
catch( /*something wrong?*/ )
Category Forum
Panels and InfusionsLabels
None yet
Statistics
2 participants
Notifications
You are not receiving notifications from this thread.
Related Questions