Author Topic: Catchable fatal error: Object of class Net_Ping_Result could not be converted to  (Read 29230 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 gives you a platform where you can ask questions related to web and internet..
So, why wait..
Join Now!
anything

Database Error

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