TwistPHP Documentation

download

File path: dist/twist/Core/Utilities/File.utility.php
Namespace: Twist\Core\Utilities
Extends: Base

downloadDownload/Copy a remote file over HTTP in chunks, outputting the chunks direclty to a local file handler. Download large files to the server without running out of system memory.

Parameters

Name Type Description
$strRemoteFilestringn/a
$strLocalFilestringn/a

Return Values

void — No return information has been documented for this function.

Example

<?php
//Set the variables for the example
$strRemoteFile 'foo';
$strLocalFile 'foo';

//Call the function download with the example vars
Twist::File() -> download($strRemoteFile$strLocalFile);