Outputting a file

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
aliasxneo
Forum Contributor
Posts: 136
Joined: Thu Aug 31, 2006 12:01 am

Outputting a file

Post by aliasxneo »

Hello all,

In my email script I am currently working on handling attachments. I got everything working and now I need to focus on the downloading of the attachment. Currently when the email is recieved the attachment is grabbed and saved to the local system with a completely random name and a .txt extension (such as "hsf2439.rar.txt") for security. I also insert the attachment details into a database including the random name of the attachment, the original name of the attachment, and the extension of the attachment.

Now, what I want to do is output this extension using the original file name and the original extension (rather than .rar.txt or what ever it may be). Is this possible, and if so how? Thanks in advanced.

Cheers,
- Josh
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

output it to... the user?

take a look at the "force download" threads and search results from your favorite search engine (or php.net) :)
Post Reply