PHP Classes

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

Recommend this page to a friend!
     
  Info   Example   View files Files   Install with Composer Install with Composer   Download Download   Reputation   Support forum   Blog    
Ratings Unique User Downloads Download Rankings
StarStarStarStar 60%Total: 474 All time: 5,987 This week: 78Up
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
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 (2)  
File Role Description
Plain text file curld.class.php Class class source
Accessible without login Plain text file example.php Example example script

The PHP Classes site has supported package installation using the Composer tool since 2013, as you may verify by reading this instructions page.
Install with Composer Install with Composer
 Version Control Unique User Downloads Download Rankings  
 0%
Total:474
This week:0
All time:5,987
This week:78Up
User Ratings User Comments (1)
 All time
Utility:85%StarStarStarStarStar
Consistency:85%StarStarStarStarStar
Documentation:-
Examples:95%StarStarStarStarStar
Tests:-
Videos:-
Overall:60%StarStarStarStar
Rank:1180
 
Helpful class
10 years ago (Nikunj Kabariya)
55%StarStarStar