Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Sign In with OpenID
Advertise on

In this Discussion

Uptime pingdom api

Uptime pingdom api

martip07martip07 Member
edited December 2012 in Help

How can I check how many hours a server is up using Pingdom API?

this is the example of php code that show days but I would lie to check and show days too.

thank you for your time: - Freelance Sysadmin.



  • Uptime is one thing, and time since last downtime is another.

    Pingdom can't give you a server's uptime.

    Fusioned | KVM SSD VPS | LSI RAID10 | Netherlands 1Gbps | R1Soft | IPv4 & IPv6 | SolusVM
  • mm good point ....... - Freelance Sysadmin.

  • WintereiseWintereise Member
    edited December 2012

    Uptime since last downtime would be pretty easy to figure out from that snippet, but as George said, you can't find out the real uptime via pingdom.

        $response = json_decode(curl_exec($curl), true);
    if (isset($response['error'])) {
    exit('Error: ' . $response['error']['errormessage']);
    $days = floor((time() - $response['check']['lasterrortime']) / 86400);
    $hours = // calculate $days * 24 here, should be easy ;)

    -- BOFH

Sign In or Register to comment.