public function request($cmd) { $url = "http://" . $this->_address . $cmd; $curl = new NetworkRequest(); $curl->set($url, array(CURLOPT_RETURNTRANSFER => 1, CURLOPT_USERPWD => $this->_authentication)); $result = $curl->execute(); $curl->close(); }
public function request($cmd, $params) { $url = "https://prowl.weks.net/publicapi/" . $cmd; $curl = new NetworkRequest(); $curl->set($url, array(CURLOPT_USERAGENT => "nzbVR-" . nzbVR::VERSION, CURLOPT_HTTPAUTH => CURLAUTH_ANY, CURLOPT_SSL_VERIFYPEER => FALSE, CURLOPT_SSL_VERIFYHOST => FALSE, CURLOPT_RETURNTRANSFER => 1, CURLOPT_FRESH_CONNECT => TRUE, CURLOPT_POST => TRUE, CURLOPT_POSTFIELDS => $params)); $result = $curl->execute(); $curl->close(); }
public function request($cmd) { $url = "http://{$this->_address}/api/{$cmd}"; $username = base64_decode(nzbVR::instance()->settings->sabnzbd_username); $password = base64_decode(nzbVR::instance()->settings->sabnzbd_password); if ($username != null && $password != null) { $url .= "&ma_username={$username}&ma_password={$password}"; } $curl = new NetworkRequest(); $curl->set($url, array(CURLOPT_RETURNTRANSFER => 1)); $result = $curl->execute(); $curl->close(); }