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 directly 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
[$intMaxRedirects = 0]integern/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';
$intMaxRedirects 0;

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