File download

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
hame22
Forum Contributor
Posts: 214
Joined: Wed May 11, 2005 5:50 am

File download

Post by hame22 »

Hi i want to make a scrpt that downloads a file to the users machine, like the custom browser download dialogue box.

The reason why I am not using the standard download box is that I want to force the user to save to their machine and not open the file.

I have read about ftp_fget() is it possible to set up such a script through this method?

thanks in advance
User avatar
neophyte
DevNet Resident
Posts: 1537
Joined: Tue Jan 20, 2004 4:58 pm
Location: Minnesota

Post by neophyte »

To download files I think you just need to change the headers. Look at this thread:

viewtopic.php?t=39981&highlight=download+image
hame22
Forum Contributor
Posts: 214
Joined: Wed May 11, 2005 5:50 am

Post by hame22 »

sorry i didnt explain myself to well,

the reason why i do not want the standard browser download box is that aswell as comin with the "Save" button it also has the "open" button, i just want my users to save. As there is no way to customise the dialgoe box to just the "save" button beacuse it is browser based i am looking at other methods to acheive the objectives.

thanks
User avatar
JayBird
Admin
Posts: 4524
Joined: Wed Aug 13, 2003 7:02 am
Location: York, UK
Contact:

Post by JayBird »

your always gonna get the defualt browser dialogue...no way around it without some kind of activeX control or additional plugin
Grim...
DevNet Resident
Posts: 1445
Joined: Tue May 18, 2004 5:32 am
Location: London, UK

Post by Grim... »

Code: Select all

<b>Click 'Save', not 'Open'</b>
How about that?
hame22
Forum Contributor
Posts: 214
Joined: Wed May 11, 2005 5:50 am

Post by hame22 »

yeah if only it was that simple! to me and you maybe but for some reason 50% of my users are blind to instructions!
Post Reply