PHP Classes

PHP Curl Parallel Requests: Send multiple HTTP parallel requests with Curl

Recommend this page to a friend!
  Info   View files View files (7)   DownloadInstall with Composer Download .zip   Reputation   Support forum (1)   Blog    
Last Updated Ratings Unique User Downloads Download Rankings
2024-01-09 (4 months ago) RSS 2.0 feedStarStarStarStar 60%Total: 538 All time: 5,596 This week: 206Up
Version License PHP version Categories
curl-parallel 1.10MIT/X Consortium ...5.3Networking, HTTP, PHP 5


This class can send multiple HTTP parallel requests with the Curl extension.

It can queue one or more HTTP requests to be send to given URLs and register an object that implements a request sender interface to handle the responses.

The class calls the registered handler object when the response of queued request is returned.

The handler receives a response object that can be called to retrieve the response status, response headers and body data.

Picture of Daniele Cruciani
  Performance   Level  
Name: Daniele Cruciani <contact>
Classes: 3 packages by
Country: Italy Italy
Age: 48
All time rank: 235594 in Italy Italy
Week rank: 286 Up12 in Italy Italy Up


Very Fast Curl class
The fastest Curl class


CurlParallel ============ This is a fork, or derivate work of James Socol OOCurl and OOCurlParallel classes. It just change some methods (adding here and there), define a Sender class and iSenderConsumer. Plain classes, examples and PHPUnit test coming soon. I could have brached from here , but I have a different plan on the use in pseudo parallel php pattern MIT License as original work. How much parallel == and php extention permit to define event loop as it work on nodejs: single process but no blocking tasks. I doubt it is the right choice, php infrastructure is not born for this. Tough PHP language by itself could be used for it (i.e. with CLI), it is not so easy to use some extention that was intended for use on apache server (or through fcgi, or php standalone server). However here is the same concept used only for one kind of I/O, it does not need libevent but in fact it works the same way, no fork, just no blocking I/O and raise event on data

  Files folder image Files  
File Role Description
Accessible without login Plain text file curl.class.php Class Class source
Accessible without login Plain text file curlparallel.class.php Class Class source
Accessible without login Plain text file httpresponse.class.php Class Class source
Accessible without login Plain text file Data Auxiliary data
Accessible without login Plain text file sender.class.php Class Class source
Accessible without login Plain text file TestCurl.php Example Unit test script
Accessible without login Plain text file urllist.url Data Auxiliary data

 Version Control Unique User Downloads Download Rankings  
This week:0
All time:5,596
This week:206Up
User Ratings User Comments (1)
 All time
Very excellent
9 years ago (Dilip)