email link to a file for download ... security

Discussions of secure PHP coding. Security in software is important, so don't be afraid to ask. And when answering: be anal. Nitpick. No security vulnerability is too small.

Moderator: General Moderators

Post Reply
purpletang
Forum Newbie
Posts: 2
Joined: Mon Oct 02, 2006 10:20 am

email link to a file for download ... security

Post by purpletang »

hi,

I want to be able to email people a link when they purchase an image/file yet not give the direct path.

As anyone can them download it etc.

I want to write a website to sell pictures, and it's this last bit I need to know.

many thanks

tony
User avatar
hawleyjr
BeerMod
Posts: 2170
Joined: Tue Jan 13, 2004 4:58 pm
Location: Jax FL & Spokane WA USA

Post by hawleyjr »

First off, welcome to the forum.

Yes, this is fairly simple to do. First you need to put the image outside of the document root. Then create a PHP script to call the file and load it to the screen using the header() We can get into more detail if you need help.
purpletang
Forum Newbie
Posts: 2
Joined: Mon Oct 02, 2006 10:20 am

Post by purpletang »

hawleyjr wrote:First off, welcome to the forum.

Yes, this is fairly simple to do. First you need to put the image outside of the document root. Then create a PHP script to call the file and load it to the screen using the header() We can get into more detail if you need help.
cool thanks :o) I look at http://www.php.net for Header() and there are examples ( as usual ) for downloading of a file.

many many thanks

and yes, I'm new :D

tony
Post Reply