コード例 #1
0
ファイル: Curl.php プロジェクト: splitice/radical-net
 function __construct($url = null)
 {
     $this->ch = curl_init();
     parent::__construct(array(CURLOPT_RETURNTRANSFER => true, CURLOPT_FOLLOWLOCATION => true));
     if ($url) {
         $this->setUrl($url);
     }
 }
コード例 #2
0
ファイル: CLI.php プロジェクト: splitice/radical-net
 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, '');
 }