Hi,<br><b>I followed your instructions, I try use "curl-setopt-array" with "curl_multi_init". </b><br><br><font size="2"><i>function curl_get_multi_content($list_layer) {<br> $curl_init = array();<br>
<br> foreach($list_layer as $i => $layer) {<br> unset($options);<br> $options = array<br> (<br> CURLOPT_RETURNTRANSFER => true,<br> CURLOPT_CONNECTTIMEOUT => 120,<br>
CURLOPT_TIMEOUT => 120,<br> CURLOPT_POST => 1,<br> CURLOPT_POSTFIELDS => $layer['data'].$layer['filter'],<br> );<br><br> $curl_init[$i] = curl_init($layer['url']);<br>
curl_setopt_array($curl_init[$i],$options);<br> }<br> <br> $curl_multi = curl_multi_init();<br> <br> foreach($list_layer as $i => $layer) {<br> curl_multi_add_handle($curl_multi, $curl_init[$i]);<br>
}<br> do {<br> curl_multi_exec($curl_multi, $running);<br> } while($running > 0);<br> <br> foreach($list_layer as $i => $layer) {<br> echo curl_multi_getcontent($curl_init[$i]);<br> $list_layer[$i] = $layer+Array('info'=>get_info_xml(curl_multi_getcontent($curl_init[$i]), $layer['name']));<br>
curl_close($curl_init[$i]);<br> }<br> return $list_layer;<br>}</i></font><br><br><b>With my server, result is correct. I've a error with server Carmen :</b><br>ZNIEFF_de_type_1=======><br>Warning: file_get_contents(<a href="http://ws.carmen.developpement-durable.gouv.fr/cgi-bin/mapserv?service_idx=8&map=%2Fmnt%2Fdata_carmen%2FBN%2FPublication%2Fwms_nature.map&VERSION=1.0.0&SERVICE=WFS&REQUEST=GetFeature&TYPENAME=ZNIEFF_de_type_1&FILTER=%3CFilter%3E%3CIntersect%3E%3CPropertyName%3EGeometry%3C%2FPropertyName%3E%3Cgml%3APolygon%3E%3Cgml%3AouterBoundaryIs%3E%3Cgml%3ALinearRing%3E%3Cgml%3Acoordinates%3E%28526467%2C6821671%20526471%2C6821675%20526480%2C6821677%20526482%2C6821676%20526491%2C6821679%20526490%2C6821682%20526546%2C6821697%20526615%2C6821701%20526616%2C6821699%20526627%2C6821699%20526628%2C6821702%20526708%2C6821705%20526804%2C6821709%20526821%2C6821701%20526886%2C6821665%20526916%2C6821658%20526933%2C6821616%20526961%2C6821574%20526969%2C6821565%20526982%2C6821513%20526833%2C6821533%20526833%2C6821517%20526813%2C6821513%20526801%2C6821508%20526749%2C6821480%20526732%2C6821469%20526718%2C6821484%20526688%2C6821481%20526616%2C6821481%20526620%2C6821448%20526584%2C6821438%20526547%2C">http://ws.carmen.developpement-durable.gouv.fr/cgi-bin/mapserv?service_idx=8&map=%2Fmnt%2Fdata_carmen%2FBN%2FPublication%2Fwms_nature.map&VERSION=1.0.0&SERVICE=WFS&REQUEST=GetFeature&TYPENAME=ZNIEFF_de_type_1&FILTER=%3CFilter%3E%3CIntersect%3E%3CPropertyName%3EGeometry%3C%2FPropertyName%3E%3Cgml%3APolygon%3E%3Cgml%3AouterBoundaryIs%3E%3Cgml%3ALinearRing%3E%3Cgml%3Acoordinates%3E%28526467%2C6821671%20526471%2C6821675%20526480%2C6821677%20526482%2C6821676%20526491%2C6821679%20526490%2C6821682%20526546%2C6821697%20526615%2C6821701%20526616%2C6821699%20526627%2C6821699%20526628%2C6821702%20526708%2C6821705%20526804%2C6821709%20526821%2C6821701%20526886%2C6821665%20526916%2C6821658%20526933%2C6821616%20526961%2C6821574%20526969%2C6821565%20526982%2C6821513%20526833%2C6821533%20526833%2C6821517%20526813%2C6821513%20526801%2C6821508%20526749%2C6821480%20526732%2C6821469%20526718%2C6821484%20526688%2C6821481%20526616%2C6821481%20526620%2C6821448%20526584%2C6821438%20526547%2C</a> in /applications/www/carmen/WFS/wfs.php on line 123<br>
<br>Warning: Cannot modify header information - headers already sent by (output started at /applications/www/carmen/WFS/wfs.php:123) in /applications/www/carmen/WFS/wfs.php on line 91.<br><br><b>It's the same message of the first error (number of ligne changed), but the function working properly on my server!!!!<br>
<br>Thanks for your help.</b><br><br>Richard LEHAUT/Tiolebucheron<br><br><div class="gmail_quote">2010/10/11 Yves Jacolin <span dir="ltr"><<a href="mailto:yves.jacolin@camptocamp.com" target="_blank">yves.jacolin@camptocamp.com</a>></span><br>
<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
Hi,<br>
<br>
Don't use file_get_contents but cURL rather:<br>
<a href="http://www.php.net/manual/fr/function.curl-setopt-array.php" target="_blank">http://www.php.net/manual/fr/function.curl-setopt-array.php</a><br>
<br>
Regards,<br>
<br>
Y.<br></blockquote></div><br>