Amazon_S3_And_CloudFront::http_prepare_download_log PHP Method

http_prepare_download_log() public method

Check for as3cf-download-log and related nonce and if found begin the download of the diagnostic log
public http_prepare_download_log ( ) : void
return void
    function http_prepare_download_log()
    {
        if (isset($_GET['as3cf-download-log']) && wp_verify_nonce($_GET['nonce'], 'as3cf-download-log')) {
            $log = $this->output_diagnostic_info(false);
            $url = parse_url(home_url());
            $host = sanitize_file_name($url['host']);
            $filename = sprintf('%s-diagnostic-log-%s.txt', $host, date('YmdHis'));
            header('Content-Description: File Transfer');
            header('Content-Type: application/octet-stream');
            header('Content-Length: ' . strlen($log));
            header('Content-Disposition: attachment; filename=' . $filename);
            echo $log;
            exit;
        }
    }
Amazon_S3_And_CloudFront