function __construct($name, $host, $port, $stringToSend, $stringToExpect) { parent::__construct($name, $host, "udp"); $this->port = $port; $this->stringToSend = $stringToSend; $this->stringToExpect = $stringToExpect; }
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; }
/** * 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); }
function __construct($name, $host) { parent::__construct($name, $host, "imap"); }
function __construct($name, $host, $nameServer, $expectedIp) { parent::__construct($name, $host, "dns"); $this->nameServer = $nameServer; $this->expectedIp = $expectedIp; }
function __construct($name, $host) { parent::__construct($name, $host, "pop3"); }
function __construct($name, $host, $url) { parent::__construct($name, $host, "httpcustom"); $this->url = $url; }
function __construct($name, $host, $port) { parent::__construct($name, $host, "tcp"); $this->port = $port; }