download_url
download_url ( $url, $timeout = 300, $signature_verification = false )
Parameters:- (string) url The URL of the file to download.
- (int) timeout The timeout for the request to download the file. Default 300 seconds.
- (bool) signature_verification Whether to perform Signature Verification. Default false.
Returns:- (string|WP_Error) Filename on success, WP_Error on failure.
Defined at:Change Log: - Introduced in WordPress: 2.5.0
- Deprecated in WordPress: —
Description
Downloads a URL to a local temporary file using the WordPress HTTP API.Please note that the calling function must delete or move the file.