i want to use this script to do ping without using the exec();
or the commands that similar to it.
the problem is i get these errors:
Strict Standards: Non-static method Net_Ping::factory() should not be called statically in C:\xampp\htdocs\test.php on line 3
Strict Standards: Non-static method Net_Ping::_setSystemName() should not be called statically in C:\xampp\php\PEAR\Net\Ping.php on line 141
Strict Standards: Non-static method Net_Ping::_setPingPath() should not be called statically in C:\xampp\php\PEAR\Net\Ping.php on line 143
Strict Standards: Non-static method PEAR::isError() should not be called statically in C:\xampp\htdocs\test.php on line 4
the code on test.php
<?php
require_once "Net/Ping.php";
$ping = Net_Ping::factory();
if (PEAR::isError($ping)) {
echo $ping->getMessage();
} else {
$ping->setArgs(array('count' => 2));
var_dump($ping->ping('example.com'));
}
?>
C:\xampp\htdocs\test.php
– J0HN