Love Fuel?    Donate

FuelPHP Forums

Ask your question about FuelPHP in the appropriate forum, or help others by answering their questions.
Multithread cURL Request
  • I want to use Request class to get content using cURL driver, for several links (more than 20 maybe). But if i use standard "for" loop, it will take too long. I want to use multi_curl, but i do not know how to use it using cURL driver of FuelPHP.

    I tried to find other library, but still did not get better result. Anyone can help?
  • The current Curl driver wraps a single request. To be able to use this, you need to be able to wrap these requests and bundle them in a single multi-request.

    This will require a new driver, and changes to the existing driver.

    Please add a feature request for this at https://github.com/fuel/core/issues, documenting your use-case.
  • Yes, i understand that current cURL only handle single request. I tried to write a new Driver, but i am not really familiar with native cURL. I hope someone can help me build this.

    Thank you Harro, I have added a feature request at the github. I hope i wrote clear use-case.
  • I wrote a multi-curl library for Codeigniter a while back. It would need some changes to get it working in FuelPHP, but it may give you a better idea for how to accomplish what you're wanting to do using mcurl: https://github.com/chadhutchins/codeigniter-mcurl
  • Really long time not visiting this forum. I just want to say that finally i use Guzzle for multithread cURL with FuelPHP.

    https://packagist.org/packages/guzzle/guzzle

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

In this Discussion