# Solved: download a file



## dannyn (Nov 9, 2007)

http://bpsepforums.org/storage/final.mov
that is the file that i want users to download..
i dont want to link to that file i want views to click the link and a thing will pop up that says do you want to save or open this file..
just like if you are downloading something from www.download.com
can you do this in html?
Thanks!


----------



## Fyzbo (Feb 6, 2002)

```
[URL=http://bpsepforums.org/storage/final.mov]Download[/URL]
```


----------



## dannyn (Nov 9, 2007)

no.. the link cant just say download it has to actually bring up the download window.


----------



## Sequal7 (Apr 15, 2001)

Easiest way is to just zip the file and link to the zipped folder, it will give them the option to download or open it.


----------



## tomdkat (May 6, 2006)

Sequal7 said:


> Easiest way is to just zip the file and link to the zipped folder, it will give them the option to download or open it.


Wow, I feel stupid for not thinking of that. It's simple and rather elegant, I think. :up:

Peace...


----------



## dannyn (Nov 9, 2007)

yes sequal7.. thats exactly what i mean...
but i dont want to zip it beacuse i dont want the viewer to have to unzip it... 
any other ideas?


----------



## DrP (Jul 23, 2005)

What about instructing your visitors to Right Click and Save Target As (or Save Link As in Firefox)?
...and, anyway, it seems to work how you'd like it to in Firefox (for me).


----------



## namenotfound (Apr 30, 2005)

DrP said:


> ...and, anyway, it seems to work how you'd like it to in Firefox (for me).


You can change the settings in Firefox to either download .mov movies, or stream them. Some may not have their Firefox set to download.


----------



## dannyn (Nov 9, 2007)

i need it to be a fool proof method...
no right click
no changing settings
just click the link and the download dialog pops up.
thanks!


----------



## Elvandil (Aug 1, 2003)

dannyn said:


> i need it to be a fool proof method...
> no right click
> no changing settings
> just click the link and the download dialog pops up.
> thanks!


That probably is not going to happen. The way a file is handled is determined by a user's browser and not what's on your end. It sees the .mov file's MIME type and automatically tries to play it with the QuickTime plugin.

The best ideas are those already given--zip or right-click.

Another idea would be to make it a self-extracting executable that people could just click on after download and it would extract and play automatically.


----------



## dannyn (Nov 9, 2007)

hm... 
i know that this is possible...
but just not in html?...
if i go to download.com
i click on a file like aim..
i click download now
and the save or open dialog pops up and the file isnt zipped.


----------



## namenotfound (Apr 30, 2005)

This can be done with a little PHP. You can force a download with a simple header script. Look on hotscripts.com for an example. I'm too lazy to write one.


----------



## Elvandil (Aug 1, 2003)

dannyn said:


> hm...
> i know that this is possible...
> but just not in html?...
> if i go to download.com
> ...


AIM is not zipped, but it is not a media file. A lot of files will download, like rar, zip, sqx, exe, doc, txt, etc. because they are not detected as media files.


----------



## namenotfound (Apr 30, 2005)

Elvandil said:


> AIM is not zipped, but it is not a media file. A lot of files will download, like rar, zip, sqx, exe, doc, txt, etc. because they are not detected as media files.


You can force ANY file to download, even picture files. Check hotscripts like I said


----------



## Elvandil (Aug 1, 2003)

namenotfound said:


> You can force ANY file to download, even picture files. Check hotscripts like I said


If you have a solution, can you please post it?


----------



## namenotfound (Apr 30, 2005)

Elvandil said:


> If you have a solution, can you please post it?


I guess you people are as lazy as I am? 
(I mean, I gave you the darn website to find it)

http://www.elouai.com/force-download.php

Found using hotscripts.com (like I told you to search)

http://www.hotscripts.com/search?q=force+download&cat=PHP&imageField.x=38&imageField.y=10

Really now, you can't have everything handed to you. I don't mind helping, but when I tell you the site to search, and you don't even make an effort to look yourself, then it's like a waste for me to post the solutions. You won't learn nothing that way....


----------



## Elvandil (Aug 1, 2003)

Thank you for elaborating on your tantalizing hint that a solution existed without actually having provided one.


----------



## DrP (Jul 23, 2005)

Fair play namenotfound. Like I read somewhere else, this isn't Live Help.
Nice find, btw.


----------



## dannyn (Nov 9, 2007)

yes, but if i ask for help i would at least like a link...
i think thats fair enough to ask...
don't you?
but as i said...
I NEED html.


----------



## Sequal7 (Apr 15, 2001)

You *can not* do it in HTML, sorry, never going to happen without a script (That is what the sites your are referring like download.com to use).


----------



## dannyn (Nov 9, 2007)

ok.. thanks...
this is solved because it HAS to be html
thanks


----------



## namenotfound (Apr 30, 2005)

dannyn said:


> ok.. thanks...
> this is solved because it HAS to be html
> thanks


Does your host not support PHP?
Is it an Apache, or IIS server?

If your host doesn't support some kind of server-side language, then it must not be that great of a host.....


----------



## dannyn (Nov 9, 2007)

no.. i have a windows server...
so i cant run php...
in Linux you can run php but not access database..
in windows you can run asp and access database.


----------



## namenotfound (Apr 30, 2005)

So if you have access to ASP, then why must it be HTML?
Do you want me to try to find an ASP script for you? Or are you dead-set on only using HTML?


----------



## dannyn (Nov 9, 2007)

well...it has to be html... because i am just editing the website and its not something that i wrote and its in some funky program... 
thank you for asking though!


----------

