note 110822 added to function.curl-multi-getcontent

From: Date: Tue, 11 Dec 2012 21:54:05 +0000
Subject: note 110822 added to function.curl-multi-getcontent
Groups: php.notes 
Request: Send a blank email to php-notes+get-192478@lists.php.net to get a copy of this message
Adding the example from the URL in the previous comment: $nodes = array('http://www.google.com', 'http://www.microsoft.com', 'http://www.rustyrazorblade.com'); $node_count = count($nodes); $curl_arr = array(); $master = curl_multi_init(); for($i = 0; $i < $node_count; $i++) { $url =$nodes[$i]; $curl_arr[$i] = curl_init($url); curl_setopt($curl_arr[$i], CURLOPT_RETURNTRANSFER, true); curl_multi_add_handle($master, $curl_arr[$i]); } do { curl_multi_exec($master,$running); } while($running > 0); echo "results: "; for($i = 0; $i < $node_count; $i++) { $results = curl_multi_getcontent ( $curl_arr[$i] ); echo( $i . "\n" . $results . "\n"); } echo 'done'; ---- Server IP: 87.106.1.137 Probable Submitter: 217.246.14.60 ---- Manual Page -- http://php.net/manual/en/function.curl-multi-getcontent.php Edit -- https://master.php.net/note/edit/110822 Del: integrated -- https://master.php.net/note/delete/110822/integrated Del: useless -- https://master.php.net/note/delete/110822/useless Del: bad code -- https://master.php.net/note/delete/110822/bad+code Del: spam -- https://master.php.net/note/delete/110822/spam Del: non-english -- https://master.php.net/note/delete/110822/non-english Del: in docs -- https://master.php.net/note/delete/110822/in+docs Del: other reasons-- https://master.php.net/note/delete/110822 Reject -- https://master.php.net/note/reject/110822 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#192478) next »