What happened to the Messenger Plus! forums on msghelp.net?
Shoutbox » MsgHelp Archive » Skype & Technology » Tech Talk » Forcing Firefox to show "Save as" dialog, or automaticly start downloading the file?

Pages: (2): « First [ 1 ] 2 » Last »
Forcing Firefox to show "Save as" dialog, or automaticly start downloading the file?
Author: Message:
Mike
Elite Member
*****

Avatar
Meet the Spam Family!

Posts: 2795
Reputation: 48
31 / Male / Flag
Joined: Mar 2003
O.P. Roll Eyes  Forcing Firefox to show "Save as" dialog, or automaticly start downloading the file?
Hello.

I have a text file (with a changed extension) on my webserver.
When I click the link of the file in firefox,  firefox just displays the contents of the text file while IE automaticly opens the file, which is what I actually want to happen...
Or, if I cant do that, show the save as dialog instead of displaying what the file has...

I searched google and i found this: http://www.codecomments.com/PERL_CGI_Beginners/message611929-1.html

Well, as I'm not using Perl, but PHP, I didn't really understand what he did... :-/

Can anyone help me?

I think it has something to do with the headers....

Thanks! :)
YouTube closed-captions ripper (also allows you to download videos!)
11-21-2005 07:09 PM
Profile E-Mail PM Web Find Quote Report
MeEtc
Patchou's look-alike
*****

Avatar
In the Shadow Gallery once again

Posts: 2200
Reputation: 60
38 / Male / Flag
Joined: Nov 2004
Status: Away
RE: Forcing Firefox to show "Save as" dialog, or automaticly start downloading the file?
make a link to the file, Right-click, Save link as...
[Image: signature/]     [Image: sharing.png]
I cannot hear you. There is a banana in my ear.
11-21-2005 07:15 PM
Profile PM Web Find Quote Report
Mike
Elite Member
*****

Avatar
Meet the Spam Family!

Posts: 2795
Reputation: 48
31 / Male / Flag
Joined: Mar 2003
O.P. RE: Forcing Firefox to show "Save as" dialog, or automaticly start downloading the file?
quote:
Originally posted by MeEtc
make a link to the file, Right-click, Save link as...
But, I want it to show a save us dialog, and dont have to make the user to do it manually.... :(
YouTube closed-captions ripper (also allows you to download videos!)
11-21-2005 07:18 PM
Profile E-Mail PM Web Find Quote Report
Stigmata
Veteran Member
*****



Posts: 3520
Reputation: 45
20 / Other / Flag
Joined: Jul 2003
RE: Forcing Firefox to show "Save as" dialog, or automaticly start downloading the file?
http://www.mozilla.org/support/firefox/options#downloads

file types?

would that work?
11-21-2005 07:34 PM
Profile PM Web Find Quote Report
stoshrocket
Senior Member
****

Avatar
formerly methos

Posts: 748
Reputation: 31
33 / Male / Flag
Joined: Aug 2005
RE: Forcing Firefox to show "Save as" dialog, or automaticly start downloading the file?
easiest way i can think of is just saving it into a .zip file then getting them to download it that way, if it is a .txt file it wont take long to download. As for the actual thing that guy did i cant figure it out, but ill keep looking for you, if i find anything ill post it back to you. :)
formerly methos
11-21-2005 07:35 PM
Profile PM Web Find Quote Report
Dempsey
Scripting Contest Winner
*****

Avatar
http://AdamDempsey.net

Posts: 2395
Reputation: 53
37 / Male / Flag
Joined: Jul 2003
RE: Forcing Firefox to show "Save as" dialog, or automaticly start downloading the file?
you can set the header to force the server to send the file, something like:

code:
header("Content-Type: application/octet-stream");
  header("Content-Disposition: attachment; filename=\"$filename"\");
SoundPacks   -   Scripts   -   Skins

that's not a bug, thats an unexpected feature
11-21-2005 07:38 PM
Profile E-Mail PM Web Find Quote Report
Mike
Elite Member
*****

Avatar
Meet the Spam Family!

Posts: 2795
Reputation: 48
31 / Male / Flag
Joined: Mar 2003
O.P. RE: Forcing Firefox to show "Save as" dialog, or automaticly start downloading the file?
quote:
Originally posted by Stigmata
http://www.mozilla.org/support/firefox/options#downloads

file types?

would that work?
Well, i want to show the save as for all my visitors, not just only me...
quote:
Originally posted by Methos2
easiest way i can think of is just saving it into a .zip file then getting them to download it that way, if it is a .txt file it wont take long to download. As for the actual thing that guy did i cant figure it out, but ill keep looking for you, if i find anything ill post it back to you. :)
Well, its a .pls (winamp playlist) file, fore my internet radio, so I think that it would be boring to have to open the zip to connect to my internet radio...

Thanks for your help anyway :)
YouTube closed-captions ripper (also allows you to download videos!)
11-21-2005 07:41 PM
Profile E-Mail PM Web Find Quote Report
rav0
Veteran Member
*****

Avatar
i have an avatar

Posts: 1419
Reputation: 29
34 / Male / Flag
Joined: Aug 2003
RE: RE: Forcing Firefox to show "Save as" dialog, or automaticly start downloading the file?
Save the file with as something.php, and add this code at the very top:
code:
<?php
header('Content-Type: application/pls+xml');
?>
| [Image: dorsh] |

(\ /)
(O.o)
(> <)

This is Bunny. Copy Bunny into your signature to help him on his way to world domination
11-22-2005 07:47 AM
Profile E-Mail PM Web Find Quote Report
Mike
Elite Member
*****

Avatar
Meet the Spam Family!

Posts: 2795
Reputation: 48
31 / Male / Flag
Joined: Mar 2003
O.P. RE: Forcing Firefox to show "Save as" dialog, or automaticly start downloading the file?
I dont know... :-/
When I put the header, it will ask me if I want to download the php file... :S
YouTube closed-captions ripper (also allows you to download videos!)
11-22-2005 01:26 PM
Profile E-Mail PM Web Find Quote Report
rav0
Veteran Member
*****

Avatar
i have an avatar

Posts: 1419
Reputation: 29
34 / Male / Flag
Joined: Aug 2003
RE: RE: Forcing Firefox to show "Save as" dialog, or automaticly start downloading the file?
quote:
Originally posted by Mike
When I put the header, it will ask me if I want to download the php file... :S

Whose headers, mine or Dempsey's? Dempsey's should ask you if you want to download the file, but not the PHP file, the proper playlist. Mine shouldn't do that at all, assuming settings in the user agent.
| [Image: dorsh] |

(\ /)
(O.o)
(> <)

This is Bunny. Copy Bunny into your signature to help him on his way to world domination
11-23-2005 09:53 AM
Profile E-Mail PM Web Find Quote Report
Pages: (2): « First [ 1 ] 2 » Last »
« Next Oldest Return to Top Next Newest »


Threaded Mode | Linear Mode
View a Printable Version
Send this Thread to a Friend
Subscribe | Add to Favorites
Rate This Thread:

Forum Jump:

Forum Rules:
You cannot post new threads
You cannot post replies
You cannot post attachments
You can edit your posts
HTML is Off
myCode is On
Smilies are On
[img] Code is On