Example #1
0
 /**
  * Handles the cURL session.
  *
  * @param string	URL to connect with
  *
  * @return Recipe_HTTP_Session_Curl
  */
 public function __construct($webpage)
 {
     if (!function_exists("curl_init")) {
         throw new Recipe_Exception_Generic("The cURL library is not available on the server.");
     }
     parent::__construct($webpage);
     return $this;
 }
Example #2
0
 /**
  * Handles the fsock session.
  *
  * @param string	URL to connect with
  *
  * @return Recipe_HTTP_Session_Fsock
  */
 public function __construct($webpage)
 {
     parent::__construct($webpage);
     if (!function_exists("fsockopen") && ini_get("allow_url_fopen")) {
         throw new Recipe_Exception_Generic("The server does not allow to fetch contents from a different webpage.");
     }
     return $this;
 }
Example #3
0
 /**
  * Destructor for request.
  *
  * @return void
  */
 public function kill()
 {
     $this->session->close();
     unset($this);
     return;
 }