Last updated on December 26th, 2015 at 11:52 am

Hello, here is a simple yet powerful script that allows webmasters to force the users download some files with the dialog box ,Do you want to open or save the file.
just copy paste the script below.

<?php 
header("Content-type:application/octect-stream");
header('Content-Disposition: attachment; filename=Test_Download_For_' . date('Y-m-d') . '.txt');
print "This is the file you downloaded, Its easy rigt  ";
?>

DEMO

Thanks Guys

Leave a Reply

Your email address will not be published. Required fields are marked *