Guzzle 6 progress of download

Though, its not mentioned within the documentation, you can use the “progress” request option.

References to it can be found here.

$options = [
    'progress' => function ($dl_total_size, $dl_size_so_far, $ul_total_size, $ul_size_so_far) {
        // do something.
    }
];

Leave a Comment