Example #1
0
 function __construct($name, $host, $port, $stringToSend, $stringToExpect)
 {
     parent::__construct($name, $host, "udp");
     $this->port = $port;
     $this->stringToSend = $stringToSend;
     $this->stringToExpect = $stringToExpect;
 }
Example #2
0
 function _prepData()
 {
     $post = parent::_prepData();
     $post += "&url=" . $this->url;
     $post += "&encryption=" . $this->encryption;
     $post += "&port=" . $this->port;
     if ($this->auth != null) {
         $post += "&auth=" . $this->auth;
     }
     if ($this->shouldContain != null) {
         $post += "&shouldcontain=" . $this->shouldContain;
     }
     if ($this->shouldNotContain != null) {
         $post += "&shouldnotcontain=" . $this->shouldNotContain;
     }
     //if ($this->postData != null) $post += "&postdata=" . $this->postData;  //TODO: Find out how this should actually be formatted, how do you POST POST data?
     if (!empty($this->requestHeaders)) {
         $i = 0;
         foreach ($this->requestHeaders as $header) {
             $i++;
             $post = +"&requestheadername" . $i . "=" . $header;
         }
     }
     return $post;
 }
Example #3
0
 /**
  * Internal function to handle adding all types of check, assumes other functions
  * have validated the data
  *
  * @param Pingdom_Check $check Check object to insert
  * @return string JSON string of result
  */
 public function addCheck($check)
 {
     $url = "/checks";
     $postData = $check->_prepData();
     return $this->_doRequest($url, $postData, self::METHOD_POST);
 }
Example #4
0
 function __construct($name, $host)
 {
     parent::__construct($name, $host, "imap");
 }
Example #5
0
 function __construct($name, $host, $nameServer, $expectedIp)
 {
     parent::__construct($name, $host, "dns");
     $this->nameServer = $nameServer;
     $this->expectedIp = $expectedIp;
 }
Example #6
0
 function __construct($name, $host)
 {
     parent::__construct($name, $host, "pop3");
 }
Example #7
0
 function __construct($name, $host, $url)
 {
     parent::__construct($name, $host, "httpcustom");
     $this->url = $url;
 }
Example #8
0
 function __construct($name, $host, $port)
 {
     parent::__construct($name, $host, "tcp");
     $this->port = $port;
 }