athlon1600/php-curl-file-downloader

There is no license information available for the latest version (v1.0.2) of this package.
Maintainers

👁 Athlon1600

Package info

github.com/Athlon1600/php-curl-file-downloader

pkg:composer/athlon1600/php-curl-file-downloader

Statistics

Installs: 109 918

Dependents: 9

Suggesters: 0

Stars: 25

Open Issues: 1

v1.0.2 2021-02-25 20:29 UTC

Requires

Requires (Dev)

Suggests

None

Provides

None

Conflicts

None

Replaces

None

Unknown License 66391a0b89e2ed8b42ed6341e111f180697e0c5f

This package is auto-updated.

Last update: 2026-05-25 07:17:32 UTC


README

👁 Supported PHP Versions
👁 GitHub Workflow Status (with event)
👁 Image
👁 Packagist Downloads (custom server)

Download large files using PHP and cURL

There's too many code snippets on the Internet on how to do this, but not enough libraries.

This will allow you to download files of any size using cURL without ever running out of memory. That's it.

<?php

use Curl\Client;
use CurlDownloader\CurlDownloader;

$browser = new Client();
$downloader = new CurlDownloader($browser);

$response = $downloader->download("https://download.ccleaner.com/cctrialsetup.exe", function ($filename) {
 return './2020-06-07-' . $filename;
});

if ($response->status == 200) {
 // 28,851,928 bytes downloaded in 20.041231 seconds
 echo number_format($response->info->size_download) . ' bytes downloaded in ' . $response->info->total_time . ' seconds';
}

It will automatically guess filename of the resource being downloaded (just like web-browsers do it!) with an option to override it if needed.

Installation

composer require athlon1600/php-curl-file-downloader "^1.0"

Links