blizzardkem
blizzardkem
``` function curl($url) { $cl = curl_init(); curl_setopt($cl, CURLOPT_URL, $url); curl_setopt($cl, CURLOPT_RETURNTRANSFER, TRUE); curl_setopt($cl, CURLOPT_HEADER, FALSE); curl_setopt($cl, CURLOPT_SSL_VERIFYPEER, FALSE); curl_setopt($cl, CURLOPT_SSL_VERIFYHOST, FALSE); $ex = curl_exec($cl); curl_close($cl); return $ex; } ```...
``` include 'classes/Requests.php'; Requests::register_autoloader(); $request = Requests::get('http://ya.ru'); ``` /// ``` [root@zm lrg]# php test.php PHP Fatal error: Uncaught exception 'Requests_Exception' with message 'cURL error 23: Failed writing body (255 !=...
``` [root@zm lrg]# php -v PHP 5.4.16 (cli) (built: Jun 23 2015 21:17:27) Copyright (c) 1997-2013 The PHP Group Zend Engine v2.4.0, Copyright (c) 1998-2013 Zend Technologies ```
The problem CURLOPT_HEADERFUNCTION / CURLOPT_WRITEFUNCTION That's earned: ``` public function request($url, $headers = array(), $data = array(), $options = array()) { ... $data = curl_exec($this->handle); list($this->headers, $this->response_data) = explode("\r\n\r\n", $data,...
This is inconvenient done! and did not properly
So it should work We present the number of streams Add 1 link as soon as the number of threads is exceeded, we expect the answer (get it in kalbeke)...
Like this, you saw how to make ParallelCurl ? Highly! HIGHLY! competent approach! and true - from all sides!
all right