take a look at this : http://www.phpclasses.org/browse/package/3220.html On Mon, Jan 25, 2010 at 11:32 AM, Ashley Sheridan <ash@xxxxxxxxxxxxxxxxxxxx>wrote: > On Mon, 2010-01-25 at 10:03 +0000, SED wrote: > > > Hi, > > > > Can anyone point me to tutorials on how to change a filename for each > > download? My goal is to give the downloader a random name for a picture > or a > > document, so he will never know what the original filename is. > > > > Regards, > > Summi > > > > > > > > > > > I save the file using the temp filename given to it by PHP during the > upload process. If that's not possible, then some sort of hash (MD5 for > example) of the original file name would suffice. Then, when the user > requests that file, they have to request it with a URL like > file.php?file=hashname > > The added benefit of this is that you can verify the user is logged in > or not too. The only problem would be if you were serving media files, > as no plugins I know of send all the correct headers for the media file > request, so your browser would see it as an anonymous request. > > Thanks, > Ash > http://www.ashleysheridan.co.uk > > >