Forum Moderators: coopster
Basically, I am attempting to write code that a download manager can understand, so to speak. My links on my site are as such:
[mysite.com...]
They open fine in a browser. However, if a download manager is used, all the visitor will get is, of course, "index.php". I know it is possible to use a link like above with download managers. I've seen numerous sites incorporate this.
If anyone knows how this is done, please point me in the right direction. I dont need "cut and paste" code, just the basics. I'll take it from there (I Hope).
TIA!
IamStang
header("Content-Transfer-Encoding: binary");
header("Expires: 0");
header("Cache-Control: must-revalidate, post-check=0, pre-check=0");
header("Content-Type: ".$xtype);
header("Accept-Ranges: bytes");
header("Content-Disposition: attachment; filename=\"".$filename."\";");
header("Content-Length: ".$filesize);
$xtype is set based on the filetype (or extension)
The other variables should be self explanatory.
The above is "modified" from another script. Could it be the "Catch-Control" portion?
Regardless of where the problem lies, I would like to learn more about headers. Anyone have any suggestions on information? Maybe that is best left to another thread?
Thanks for the time you folks spend on this.