Jump to content

download script


westman

Recommended Posts

when you request a file, the browser downloads it everytime. it will usually prompt to download unless the specifed file has any plugin installed to show the file in browser (eg like pdf file, or realone player uses a plugin to show videos) You can use header("content-disposition:attachment"); to force download rather than showing it in the browser.

Link to comment
Share on other sites

$down_file = "www.mysite.com/files/15.png";  header("Content-Disposition: attachment; filename=pic.png"); readfile($down_file);

Edited by birbal
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...