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
StarStarStarStar 60%Total: 474 All time: 5,985 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
Age: 37
All time rank: 17042 in Luxembourg Luxembourg
Week rank: 298 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:0
All time:5,985
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:1165
 
Helpful class
9 years ago (Nikunj Kabariya)
55%StarStarStar