distancefinder/download.php

22 lines
688 B
PHP
Raw Permalink Normal View History

<?php
require_once 'bootstrap.php';
$content = file_get_contents(DIRPATH.DISTANCES_FILE);
$contentLength = strlen($content);
header('Expires: Mon, 23 Jul 1993 05:00:00 GMT');
header('Last-Modified: ' . gmdate('D, d M Y H:i:s') . ' GMT');
header('Cache-Control: no-store, no-cache, must-revalidate');
header('Cache-Control: post-check=0, pre-check=0', false);
header('Pragma: no-cache');
header('Content-Description: File Transfer');
header('Content-Type: application/octet-stream');
header('Content-Transfer-Encoding: binary');
header('Content-Disposition: attachment; filename=' . DISTANCES_FILE);
header('Content-Length: ' . $contentLength);
echo $content;