php download script

Solutions on MaxInterview for php download script by the best coders in the world

showing results for - "php download script"
Mathilda
26 Jun 2017
1<?php
2/*Actual filename = 'attachment.zip' (Unknown to the viewers).
3When downloaded to be saved as 'mydownload.zip'.
4*/
5$filename='mydownload.zip';
6@header("Content-type: application/zip");
7@header("Content-Disposition: attachment; filename=$filename");
8echo file_get_contents('attachment.zip');
9?>
10