2 Replies Latest reply on Oct 3, 2007 12:03 PM by AngryCloud

    Saving content to hard drive

    AngryCloud Level 1
      If possible, I would like to allow users to click a link to download the content they see on a page. For example, a user watches a flash video (src="submissions/some_file.swf") on a page, and wants to download the flash video to their hard drive. I would like to provide a link that says something like "Download this file" which, when clicked, would show the browser's download dialog to save the file to the disk, as if it were an archive or some other file type that would normally display the download dialog. Is this possible?

      By the way, I use PHP as my server-side script.
        • 1. Re: Saving content to hard drive
          Level 7
          AngryCloud wrote:
          > If possible, I would like to allow users to click a link to download the
          > content they see on a page. For example, a user watches a flash video
          > (src="submissions/some_file.swf") on a page, and wants to download the flash
          > video to their hard drive. I would like to provide a link that says something
          > like "Download this file" which, when clicked, would show the browser's
          > download dialog to save the file to the disk, as if it were an archive or some
          > other file type that would normally display the download dialog. Is this
          > possible?


          Put a copy of the swf file into a folder, zip it and upload the zipped
          file to the server.

          Put a link below or next to the flash file on your page (the one the
          user views) and then point the link at the zipped swf file.
          • 2. Re: Saving content to hard drive
            AngryCloud Level 1
            The files are user-submitted content, so the file would have to be zipped automatically in a PHP script. I have looked in the PHP manual and searched the internet a bit on this subject, so I know it is possible. But this seems like one of those things that is going to take me all day (or longer) to figure out. Could someone maybe point me in the right direction? =)

            My server's PHP version is 4.4.6.