PHP Multiple Curl Requests

僤鯓⒐⒋嵵緔 提交于 2019-11-27 04:29:24
  • Reuse the same cURL handler ($ch) without running curl_close. This will speed it up just a little bit.
  • Use curl_multi_init to run the processes in parallel. This can have a tremendous effect.

take curl_multi - it is far better. Save the handshakes - they are not needed every time!

cuttinger

or take pcntl_fork, fork some new threads to execute curl_exec. But it's not as good as curl_multi.

abdulwadood

when i use code given in "http://php.net/curl_multi_init", response of 2 requests are conflicting. But the code written in below link, returns each response separately (in array format) https://stackoverflow.com/a/21362749/3177302

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!