Example #1
0
 public function __construct()
 {
     parent::__construct();
     $this->mysql = new db_connect();
     $this->pzn = $this->mysql->get_pzn();
     $this->negative_kws = $this->mysql->get_negative_kws();
 }
 public function __construct($sUrl, $sApp, $sExtra)
 {
     parent::__construct($sUrl);
     $aCurlVersion = curl_version();
     $sCurlVersion = $aCurlVersion['version'];
     $sPHPVersion = PHP_VERSION;
     $this->setUserAgent("{$sApp} ({$sExtra}; PHP {$sPHPVersion}; cURL {$sCurlVersion})");
     $this->setReturnTransfer(true);
     $this->setFollowLocation(true);
 }
 public function __construct($sUrl, $sApp, $sExtra)
 {
     parent::__construct($sUrl);
     $aCURLVersion = curl_version();
     $this->setUserAgent($sApp . ' (' . $sExtra . '; PHP ' . PHP_VERSION . '; cURL ' . $aCURLVersion['version'] . ')');
     // setting CURLOPT_FOLLOWLOCATION in safe_mode will raise a warning
     if (ini_get('safe_mode') == 'Off' || ini_get('safe_mode') === 0) {
         $this->setOption(CURLOPT_FOLLOWLOCATION, true);
         $this->setOption(CURLOPT_MAXREDIRS, 3);
     }
 }
Example #4
0
 /**
  * Initialize the wraper with an internal cURL handle
  *
  * @param str $url
  * @return void
  */
 public function __construct($url = NULL)
 {
     $this->handle = curl_init();
     parent::__construct($url);
 }
Example #5
0
 /**
  * Constructor
  *
  * @param array $options
  */
 public function __construct($url, $options = null)
 {
     parent::__construct($url, $options);
     $this->prepare();
 }
Example #6
0
 public function __construct()
 {
     parent::__construct();
 }
Example #7
0
 public function __construct(array $curlOptions = array())
 {
     parent::__construct($curlOptions);
 }
 public function __construct($logger)
 {
     $this->log = $logger;
     parent::__construct($logger);
     $this->log->debug('-------------------------------------- NEW REQUEST --------------------------------------');
 }
Example #9
0
 /**
  * Class constructor
  *
  * @return	void
  */
 public function __construct($base_url = null)
 {
     parent::__construct($base_url);
 }