** HELP WITH DOWNLOADS **

by 10 replies
12
Hi,

I have a little question about downloading. How can I make Browsers to download straight the goods when someone is clicking on the download link.

Currently they need to right click on the link and "save link as"!

Hope this clear enough what I mean!

Please give me some ideas! Thank you.

Peter
#programming #downloads
  • Typically I'd load another PHP page, typically in a hidden iframe, and set the page's header parameters to force a browser download (i.e. it shows the option in the browser to save / open the file).
    • [1] reply
    • That's what I do as well. From what I know, there is not an easier way to work around this. You can probably find a php download file script on the net then link to a download now page and have a hidden iframe to that script. I would probably do something like this:

      <iframe src="download_script.php?download=whatever.csv" style="display: none;">Upgrade your browser</iframe>

      So that Iframe will trigger the download, and the page the iframe is on will say something like you're downloading whatever file...
      • [ 1 ] Thanks
      • [1] reply
  • I get browser problems with some browsers when using this method. That is why I started to use the iframe.
    • [1] reply
    • Well, this is a proven method used on sites that get millions of pageviews per month. Did you actually try my script?
  • I gave it a try. That is a nice script.

    I'm talking about with more of a force download though... where you go to the page that says it is downloading and it automatically pops up. I haven't been able to get that to work without putting it in an Iframe because without the Iframe some browsers just load the download script and don't print the page contents.
  • I saying a Huge Thank YOU for All of You for your help!

    Forgive me, but I'm not techie and I have no idea to use this scripts. What I have done is cut and paste the code into an empty FrontPage page then saved. After I have renamed it to make it a .php file! So now i have a .php just no clue what should do next!
  • I have Find it out! Everything is Working!

    Thank You Very Much!!!!

Next Topics on Trending Feed