function __construct($url = null) { $this->ch = curl_init(); parent::__construct(array(CURLOPT_RETURNTRANSFER => true, CURLOPT_FOLLOWLOCATION => true)); if ($url) { $this->setUrl($url); } }
function __construct($url = null) { parent::__construct(array(CURLOPT_RETURNTRANSFER => true, CURLOPT_FOLLOWLOCATION => true)); if ($url) { $this->setUrl($url); } $this->outputFile = '/tmp/' . md5(time() . '|' . microtime(true) . '|' . rand(0, 10000)) . '.curl'; file_put_contents($this->outputFile, ''); }