I am trying to download images using this script. It works great with .gif files but however .jpg files is a different story. Could someone please help me out.
<?php
header("Content-type: application/octet-stream");
header("Content-Transfer-Encoding: binary");
header("Content-Disposition: attachment; filename=$down");
readfile("$down","r");
?>
This is how I am currently testing the code...
<form method="POST" action="download.php"> <table width="475">
<tr>
<td width="126" align="right"><p>Image File*</p></td>
<td width="403" valign="top">
<textarea cols="30" rows="5" wrap="VIRTUAL" name="down">http://www.furniturefirst.com/images/dealerlocator_map.jpg</textarea></td>
</tr>
<tr>
<td align="center" valign="top" colspan="3">
<input type="submit" value="Send Contact Request"></td>
</tr>
</table>
</form>