PHP code example of dasundev / laravel-aria2
1. Go to this page and download the library: Download dasundev/laravel-aria2 library. Choose the download type require. 2. Extract the ZIP file and open the index.php. 3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
dasundev / laravel-aria2 example snippets
use Dasundev\LaravelAria2\Facades\Aria2;
use Dasundev\LaravelAria2\Transfer\TransferStatus;
Aria2::url('https://example.com/file.iso')
->dir(storage_path('app/downloads/1'))
->onProgress(function (TransferStatus $status) {
//
})
->download();