Example #1
0
 function _pingdom_data()
 {
     $apikey = 'eb457d7a6669e5cbd41f5ca613ef1df9';
     $wsdl = 'https://ws.pingdom.com/soap/PingdomAPI.wsdl';
     $client = new SoapClient($wsdl);
     if (!isset($_SESSION['pingdomsid'])) {
         $response = $client->Auth_login($apikey, array('username' => '*****@*****.**', 'password' => 'DYyYzljYmQzO'));
         if ($response->status == 0) {
             $sid = $response->sessionId;
             $_SESSION['pingdomsid'] = $sid;
         }
     }
     if (isset($_SESSION['pingdomsid'])) {
         $sid = $_SESSION['pingdomsid'];
         $response = $client->Report_getCurrentStates($apikey, $_SESSION['pingdomsid']);
     }
     if ($response->status == 0) {
         return $response->currentStates;
     }
     return false;
 }