Automatic Download Page

Discussion in 'Web Design and Development' started by JOD8FY, Aug 21, 2007.

  1. JOD8FY macrumors 6502a

    JOD8FY

    Joined:
    Mar 22, 2004
    Location:
    United States
    #1
    Hi,

    I want to create a webpage where once somebody visits the page, a file begins to download automatically. How can I do this? I am currently using RapidWeaver 3.5.

    Thanks,
    JOD8FY
     
  2. Matteh117 macrumors regular

    Joined:
    May 24, 2007
    Location:
    Surrey, UK
    #2
    You can't make somebody automatically download a file due to (obvious) security issues.

    You can, however, give them the download dialog where they accept, save or whatever options their browser has.

    You could do this by redirecting to the file. The page will stay the same, but the file download dialog will appear. To do this, place this inside your head tags.
    HTML:
    <meta http-equiv="refresh" content="1;url=http://www.site.com/file.zip">
    Content = time until the new page is loaded.
    Url = ...url to file.
     
  3. Mal macrumors 603

    Mal

    Joined:
    Jan 6, 2002
    Location:
    Orlando
    #3
    Be warned, though, most people will be very suspicious of any site that asks them to download something as soon as they get there. You're better off simply linking to it and making it fairly apparent. Besides, do you want people to have to keep seeing that same download pop up every time they visit the site/page?

    jW
     
  4. JOD8FY thread starter macrumors 6502a

    JOD8FY

    Joined:
    Mar 22, 2004
    Location:
    United States
    #4
    Thanks for the replies. I'm actually selling a piece of software I made on my website. The automatic download page I'm talking about will be the page the customer is redirected to after payment has been processed. I was thinking that this would be better than providing a download link because I could limit the person to just one download. Any other suggestions are greatly appreciated.

    Thanks,
    JOD8FY
     
  5. Mal macrumors 603

    Mal

    Joined:
    Jan 6, 2002
    Location:
    Orlando
    #5
    Not sure I understand. If they reload the page, they'll get it downloaded again anyways, or they can simply bookmark that page and again, they'll get it again. There's better ways of doing this, usually involving some sort of service, though, or better yet you could simply use a serial number system so that no matter how many times they download they can only use it once.

    jW
     
  6. JOD8FY thread starter macrumors 6502a

    JOD8FY

    Joined:
    Mar 22, 2004
    Location:
    United States
    #6
    Good point, I hadn't thought of that before. I might have to work on implementing some sort of serial number service.

    Thanks again for all the help.

    JOD8FY
     
  7. OutThere macrumors 603

    OutThere

    Joined:
    Dec 19, 2002
    Location:
    NYC
    #7
    It would be relatively easy to limit the number of downloads by giving the user a single-use code that authorizes one download. I could do it in php, but I'm not sure how you're set up.
     
  8. Matteh117 macrumors regular

    Joined:
    May 24, 2007
    Location:
    Surrey, UK
    #8

    Oh I forgot to mention. Set the time to zero for instant redirection.
     

Share This Page