Jump to content

Php Based file request


ev5unleash

Recommended Posts

I think you can use header() to do that.

 

Copied from php.net:

<?php
// We'll be outputting a PDF
header('Content-type: application/pdf');

// It will be called downloaded.pdf
header('Content-Disposition: attachment; filename="downloaded.pdf"');

// The PDF source is in original.pdf
readfile('original.pdf');
?>

Try this:

<?php
header('Content-type: application/exe');

// It will be called downloaded.pdf
header('Content-Disposition: attachment; filename="linktofile.exe"');

// The PDF source is in original.pdf
readfile('linktofile.exe');
?>

 

I am not to sure though, as I've never had to do it.

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.