string
Net_Ping::ping (
string
host
)
Execute une commande Ping.
string $host - Le nom du serveur ou une adresse IP
string - Le message retourné par la commande Ping.
This function can not be called statically.
Envoyer une requête Ping
<?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'));
}
?>