Lid |
|
Had ik helemaal niet aan gedacht
<?php
$server = "sitemasters.be";
//load
$load_start = array_sum(explode(' ', microtime()));
@fsockopen($server, 80, $errstr, $errno, 5);
$load = round(array_sum(explode(' ', microtime())) - $load_start, 4);
//http
if(@fsockopen($server, 80, $errstr, $errno, 1))
{
$http = "On";
}
else
{
$http = "Off";
}
//ftp
if(@fsockopen($server, 21, $errstr, $errno, 1))
{
$ftp = "On";
}
else
{
$ftp = "Off";
}
//sql
if(@fsockopen($server, 3306, $errstr, $errno, 1))
{
$sql = "On";
}
else
{
$sql = "Off";
}
echo "<b>Load:</b> ".$load."<br>";
echo "<b>http:</b> ".$http."<br>";
echo "<b>ftp:</b> ".$ftp."<br>";
echo "<b>mysql:</b> ".$sql."<br>";
?>
<?php $server = "sitemasters.be"; //load //http if(@fsockopen($server, 80, $errstr, $errno, 1)) { $http = "On"; } else { $http = "Off"; } //ftp if(@fsockopen($server, 21, $errstr, $errno, 1)) { $ftp = "On"; } else { $ftp = "Off"; } //sql if(@fsockopen($server, 3306, $errstr, $errno, 1)) { $sql = "On"; } else { $sql = "Off"; } echo "<b>Load:</b> ".$load."<br>"; echo "<b>http:</b> ".$http."<br>"; echo "<b>ftp:</b> ".$ftp."<br>"; echo "<b>mysql:</b> ".$sql."<br>"; ?>
Maar nu doet hij de load niet goed naar mijn gevoel |