PHP Classes

PHP Curl Multi File Download: Download several files simultaneously using Curl

Recommend this page to a friend!
  Info   View files Example   View files View files (2)   DownloadInstall with Composer Download .zip   Reputation   Support forum (1)   Blog    
Ratings Unique User Downloads Download Rankings
StarStarStar 58%Total: 474 This week: 1All time: 5,984 This week: 560Up
Version License PHP version Categories
curld 1.0.2GNU General Publi...5.3HTTP, PHP 5, Files and Folders
Description 

Author

This class can download several files simultaneously using Curl.

It can send multiple HTTP requests to remote servers to retrieve the contents of given URLs using Curl multi-request support.

The class waits for all requests to be served and saves each content in given local files.

Picture of Amir
Name: Amir <contact>
Classes: 4 packages by
Country: Luxembourg Luxembourg
Age: 37
All time rank: 17042 in Luxembourg Luxembourg
Week rank: 416 Up1 in Luxembourg Luxembourg Up
Innovation award
Innovation award
Nominee: 1x

Example

<?php

include "curld.class.php";

$data = array(
    array(
"url" => "http://s9.uploads.im/uxqIn.jpg", "saveas" => "1.jpg"),
    array(
"url" => "http://s9.uploads.im/uxqIn.jpg", "saveas" => "2.jpg"),
    array(
"url" => "http://s9.uploads.im/uxqIn.jpg", "saveas" => "3.jpg"),
    );
// First variable includes urls and paths , second variable is the number of files that you want download simultaneously . If the number of files is more than this variable then class list them and download them in order .
curld::download($data, 3);

?>


  Files folder image Files  
File Role Description
Plain text file curld.class.php Class class source
Accessible without login Plain text file example.php Example example script

 Version Control Unique User Downloads Download Rankings  
 0%
Total:474
This week:1
All time:5,984
This week:560Up
User Ratings User Comments (1)
 All time
Utility:81%StarStarStarStarStar
Consistency:81%StarStarStarStarStar
Documentation:-
Examples:93%StarStarStarStarStar
Tests:-
Videos:-
Overall:58%StarStarStar
Rank:1540
 
Helpful class
9 years ago (Nikunj Kabariya)
55%StarStarStar