Jul 25, 2008

Download Script

Free Web Hosting, No Ads > CONTRIBUTE > Computers > Programming Languages > Others

free web hosting

Download Script

bthaxor
hey all,

on my website, i would to link to files that i have created/found. since these files are larger than 5mb, and i didn't want to waste my precious 500mb space, i hosted them on fileden, an online file storage site allowing hotlinking. an example of a url from this site is:

http://www.fileden.com/files/2007/10/20/15...some%20file.mp3

so anyway, on one of my pages i would like to have a link to one of these files. however, instead of streaming the file as the website would normally do for the mp3 extension, i would like to 'force' the save link as / save as dialog to appear.

i have thoroughly researched this, however all of the working solutions require the php file to be placed in the same directory as the other files, and with the random urls that fileden generates that is not possible. otherwise, they use the $filename attriibute, which uses relative urls (e.g. ../../some file.mp3), which is also not possible in this case.

the javascript solution, which works, is not firefox compatible, and since i always use firefox and am a large fan of it, i find that frustrating.

for webdesign i use xhtml+css, and do not know php. which is why i need help, since most/all of the working solutions seemed to use php.

so, my question/request: any code which is incorporateable into a html page and takes into consideration my lack of php knowledge, which forces a 'save link as/save as' dialog to appear once the user clicks on a link, and is cross-browser.

thanks so much if you are able to help.

also, one last thing: if possible, i would like this code to be php/javascript, because they are the easiest to incorporate into html. NO ASP PLEASE!!!

Notice from rvalkass:

Merged double post.

 

 

 


Reply

imbibe
could u post the javascript solution. someone might be able to port it to FF.
And according to Trap17 rules do not make double posts. edit your original one.

Reply

bthaxor
the javascript code (only for ie) is:

CODE
<a href="java script:void(0);" onclick="document.execCommand('SaveAs',true,'http://fileden.com/somefolder/some file.mp3');">download</a>


and sorry about the double post, it is merged.

Reply

galexcd
I think the best solution is to zip it. That way all browsers will be forced to download it, but why are you forcing people to download this song? I like to listen to mp3's streaming in my browser.

Reply

bthaxor
i would like to force the download because that is exactly what the link is supposed to be: a download. i have asked people if they stream their music, believe me, and NO-ONE did.

also, i really wouldn't like to resort to a zip file! that's taking the easy way out... besides, i have already uploaded all my files as mp3's, you have no idea how long that took.

one last thing: i can't tell them to right click -> save link as even if i wanted to, because i have a script which disables the right click and is cross browser (at least it stops n00bs from viewing my source... all those who don't know how to user the menu bar).

the best approach to this would most likely be a download.php, however as mentioned before i do not know php, and the scripts that are available on the net have so far all required that the php file be placed in the same directory as the files, which is not possible in this case.

i have also heard something about content disposition headers... how do they work?

Reply



Got an Opinion! Express your Views! (no registration):-
Add your Reply/ Opinion/ Views/ Comments/ Suggestion/ Questions/ Queries etc.
Posts with decent grammar & English will be accepted and please refrain from profanities.
For asking a Question, We recommend you to sign-up (for free) so that you can track the topic easily.

Nature of your Post*: Opinion/ Reply/ Comments
Question/Query
Feedback to us.
       
Name   Email
Title/Question*

(Maximum characters: 10,000)
You have characters left.
Confirm Code:

Recent Queries:-
  1. document.execcommand firefox saveas - 1.13 hr back. (1)
  2. dowload cript - 9.28 hr back. (1)
  3. document.execcommand download - 9.69 hr back. (1)
  4. java scripting mp3- tutorial download - 26.95 hr back. (1)
  5. javascript download stream save html page - 28.02 hr back. (1)
  6. download script for "wanted" - 28.76 hr back. (1)
  7. like fileden.com script - 42.61 hr back. (1)
  8. fileden script - 43.47 hr back. (1)
  9. download document force saveas link - 52.36 hr back. (1)
  10. downloadscript - 61.19 hr back. (1)
  11. javascript saveas firefox - 98.18 hr back. (1)
  12. forcing saveas - 107.18 hr back. (1)
  13. url download all files on a webpage fileden - 118.56 hr back. (1)
  14. javascript download previou - 166.83 hr back. (1)
Similar Topics

Keywords : download, script

  1. Streaming Video Capture On Linux
    this script will download all the stream video using linux mplayer (2)
  2. Lightbox Script Variations
    (0)
    When the Web 2.0 and Ajax era kicked the best of the best in programmers started creating scripts of
    various kinds. One of these scripts called Lightbox has one of the biggest impact I have notice, it
    is well customizable to fit various formats, such as images, videos, and even maps. To start off I
    will post a link to the original source of the script, I think. Lightbox The object of this
    script is simple, when a user clicks on a thumbnail version of an image it does smooth transition of
    a pop up image that is larger, usually the original size, and when the user cl....
  3. Ajax - A New Technology
    AJAX relies on Java Script (10)
    Recently i did one of my project using AJAX and i could experience the real advantage of this
    Language , What do you say about that ?....
  4. How Can I Make An Auto-updating Shoutbox Type Script?
    I have a few ideas involving AJAX but im looking for something more.. (4)
    Hi all. Ive just started to experiment with AJAX working with PHP and MYSQL to get data and display
    it and im looking to implement it into a shoutbox similar to the one here on the forums but i have a
    question... i know how to use ajax and JS to refresh the contents of a DIV every few seconds r so
    and that essentially reloads the shoutbox content as the REFRESH button does up there ^^ on the
    shoutbox but i think it silly that it should update every few seconds even if theres no new activity
    so what im looking for is a way of letting my AJAX know when there is a new ent....
  5. Looking For Phpbb Script
    (2)
    Hi Friends, I am new to this phpbb script, I come across some features in some site... In some
    sites, the user should reply to the post to view the hidden content. ... Where can I find this kind
    of scripts or plug-ins... Please reply me in this thread.......
  6. Swf Cd Help Needed Please
    Need assistance with a next/previous page script (1)
    Question is: I have a web page that displays a flash file that zooms and pans, but the next page
    button doesnt work. 1. Can the next page work and load the next or previous numbered file? 2. Does
    it have to have all pages in one file, then it calls the next frame? I can e-mail you the 3
    pages/files directly, firewall wont let me pload them. Thank you....
  7. How Do I Script A Tutorial Submit Site
    (3)
    I am very interested in learning how to create or start my own tutorial submitt site. What do I
    need to learn ? What do I need to have. Is there a script that can be made up or a software? What
    I would like to do is start my own tutorial submit site. something similar to good-tutorials and or
    pixel2life except those sites are really big and cover many tutoriasl for many different programs.
    Id like to just cover tutorials for maybe a total of 3 to 4 different programs. Im sure I need
    hosting a domain a site and some good forums to get something good going. But t....
  8. Error In Purchased Script
    Help Me? (9)
    Ok well i bought a script off the net and tried uploading it to my server and it gave me this error
    Fatal error: Unable to read 22293 bytes in /home/ancient/public_html/index.php on line 0 so i
    contacted the guy who made the script and he said there was nothing wrong with the script and gave
    me a ftp to his account and told me to upload the it there and it works on there so i tried another
    script from another guy and i get same error you guys know anything about it???? Moving from
    Computinghost > Technical Support to Programming. Edited topic title--"Help with a scr....
  9. Need Script Please
    need script (4)
    Hey everyone i need a script for a password protected page but not just that i also want and
    registration form with it can n e help....
  10. What Is A News Script?
    Fusion News? Cute News? (1)
    What do news scripts such as Fusion News and Cute News do? Does it provide local news or global
    news or something? Or is it something else?....

    1. Looking for download, script

Searching Video's for download, script
advertisement



Download Script



 

 

 

 

ADD REPLY / Got an Opinion! Remove these ADs! RAPID SEARCH! Free Web Hosting [X]
Express your Opinions, Thoughts or Contribute more info. to help others.
Ask your Doubts & Queries to get answers, So that "Together We can help others!"
Register FREE for AD-FREE forum, Create your own topics, Ask Questions, track topics, setup subscriptions & notifications and Get a Free Website w/ Email and FTP.
500MB Space *No Ads*, CPanel, FTP, PHP, MySQL, EMails - 100% FREE