-
hph help, downloading a file from another web directory
Hi, I want a user to be able to download a file from a different directory on the server, that is not part of the website.
A user pays for the file, once the payment has been processed the system gets the file from a private directory on the server and gives it to the user.
I did this in ASP once using the "mySmartUpload" package but really need to do it in PHP now.
Thanks
-
Hi,
something like
<?
$filename = "xxx";
$fp = fopen("otherdir/$filename", "r");
header("Content-type: aplication/octet-stream");
header("Content-disposition: attachment; filename=\"$filename\"");
fpassthru($fp);
?>
Musicman
-
yeeeey
cheers Musicman!! thats exactly what i was after
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|