Skip to content

Instantly share code, notes, and snippets.

View muhammadsikandarkhatri's full-sized avatar
💭
I may be slow to respond.

Muhammad Sikandar muhammadsikandarkhatri

💭
I may be slow to respond.
View GitHub Profile
<?php
require __DIR__ . '/vendor/autoload.php';
use GuzzleHttp\Client;
$url = "https://domain.tld/large-file.mp4";
$tmpFile = tempnam(sys_get_temp_dir(), 'guzzle-download');
$handle = fopen($tmpFile, 'w');