help needed download image
Posted: Sat Dec 24, 2005 6:26 am
Sami | Please use
but its downloading a html file plz help where i am wrong.......
hope to hear very soon.
Sami | Please use
Code: Select all
andCode: Select all
tags where appropriate when posting code. Read: [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url][/color]
hi,
i want to download images from my site i am writing this codeCode: Select all
<?
$filename = $_GET['imgname'];
$filepath = $_GET['imgpath'];
$size = filesize($filepath);
header("Pragma: public");
header("Expires: 0");
header("Cache-Control: must-revalidate, post-check=0, pre-check=0");
header("Cache-Control: private",false);
header("Content-Type: application/octet-stream");
header("Content-Disposition: attachment; filename=".$filename);
header("Content-Transfer-Encoding: binary\n\n");
header("Content-Length: ".$size);
?>hope to hear very soon.
Sami | Please use
Code: Select all
andCode: Select all
tags where appropriate when posting code. Read: [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url][/color]