comparison geotemco/php/download.php @ 11:389cf726303e

mode=1, and add download.php
author nylin@mpiwg-berlin.mpg.de
date Tue, 27 Oct 2015 15:05:07 +0100
parents 57bde4830927
children
comparison
equal deleted inserted replaced
10:8f5635197895 11:389cf726303e
1 <?php
1 <?php 2 <?php
2 /* 3 /*
3 * proxy.php 4 * proxy.php
4 * 5 *
5 * Copyright (c) 2013, Sebastian Kruse. All rights reserved. 6 * Copyright (c) 2013, Sebastian Kruse. All rights reserved.
26 $filesize = strlen($file); 27 $filesize = strlen($file);
27 28
28 $mime = array('application/octet-stream'); 29 $mime = array('application/octet-stream');
29 30
30 header('Content-Type: '.$mime); 31 header('Content-Type: '.$mime);
31 header('Content-Disposition: attachment; filename="test.kml"'); 32 header('Content-Disposition: attachment; filename="download.kml"');
32 header('Content-Transfer-Encoding: binary'); 33 header('Content-Transfer-Encoding: binary');
33 header('Content-Length: '.sprintf('%d', $filesize)); 34 header('Content-Length: '.sprintf('%d', $filesize));
34 header('Expires: 0'); 35 header('Expires: 0');
35 36
36 // check for IE only headers 37 // check for IE only headers