Author Topic: Catchable fatal error: Object of class Net_Ping_Result could not be converted to  (Read 29227 times)

omi

  • Newbie
  • *
  • Posts: 13
I am trying to ping domains / ips through php and I am using pear. I am using NET/Ping pear class. Now when I try to execute following code..

Code: [Select]
require_once "Net/Ping.php";
    $ping = Net_Ping::factory();
    if(PEAR::isError($ping)) {
      $name = $ping->getMessage();
}
    else
    {
      /* Number of packets to send */
      $ping->setArgs(array('count' => 4));
        $rawData=$ping->ping('18.23.32.2');
      $name = "<pre>" . $rawData . "</pre>";
}

I want to then later give outfrom $name as array but I am facing the error ..
Code: [Select]
Catchable fatal error: Object of class Net_Ping_Result could not be converted to

 

X

Do you know?

IfandBut.com helps you to keep yourself updated with latest internet business trends.
Join Now!
anything

Database Error

Please try again. If you come back to this error screen, report the error to an administrator.
Back