大佬教程收集整理的这篇文章主要介绍了在CURL和PHP Geocoder中,连接在10000毫秒后超时,大佬教程大佬觉得挺不错的,现在分享给大家,也给大家做个参考。
for ($x = 0; $x < 1000; $x++) { //////////////////////////////////////////////////// // GECODE THE adress AND GET THE COORDS $curl = new \Ivory\@R_607_10107@Adapter\Curl@R_607_10107@Adapter(); $geocoder = new \Geocoder\Provider\BingMaps($curl,$bingApikey); //$geocoder = new \Geocoder\Provider\mapquest($curl,$mapquestApikey); //$geocoder = new \Geocoder\Provider\ArcGISOnline($curl); //$geocoder = new \Geocoder\Provider\OpenStreetMap($curl); $result = $geocoder->geocode($matchesadressRightValues[$x][0]); if (count($result)==0 || count($result)>1 ){ $bingSucUn = 'not_success'; array_push($arraySucUnsucBing,$bingSucUn); } else { //echo ('result'); //echo (count($result)); //echo ('Endresult'); $bingSucUn = 'success'; array_push($arraySucUnsucBing,$bingSucUn); } //var_dump($result); //////////////////////////////////////////////////// } // end for
("Connection timed out after 10000 milliseconds").
我怎样才能增加限额?
我在屏幕上添加了这个,但它仅用于PHP而不是curl请求:
set_time_limit(0);
通常,如果我使用的是纯CURL而没有集成在PHP Geocoder中,那么我会做类似的事情:
$ch = curl_init(); curl_setopt($ch,CURLOPT_TIMEOUT,1000);
但是我现在该怎么办?
以上是大佬教程为你收集整理的在CURL和PHP Geocoder中,连接在10000毫秒后超时全部内容,希望文章能够帮你解决在CURL和PHP Geocoder中,连接在10000毫秒后超时所遇到的程序开发问题。
如果觉得大佬教程网站内容还不错,欢迎将大佬教程推荐给程序员好友。
本图文内容来源于网友网络收集整理提供,作为学习参考使用,版权属于原作者。
如您有任何意见或建议可联系处理。小编QQ:384754419,请注明来意。