Page 2 of 2 FirstFirst 12
Results 11 to 16 of 16

Thread: How to make files available for download automatically?

  1. #11
    Derek
    Guest

    Default Re: How to make files available for download automatically?

    On 25/02/2010 04:29, bw wrote:
    > Chuck,
    >
    > That's what I was looking for--something like that.
    >
    > Unfortunately it did not work for me. It is a linux server. I created a
    > text file which contained only "Options Indexes" (without the quotes and no
    > carriage return) and saved it with the name .htaccess I then uploaded it
    > to the folder. When I went to the folder with Firefox, I received the
    > following message:
    >
    > Internal Server Error: The server encountered an internal error or
    > misconfiguration and was unable to complete your request.
    > Thanks,
    >
    > Brian


    Just as a check; try

    Options +Indexes

    The + should be optional but the server may be being aggressive... also
    worth checking that it's an Apache server, not all web servers read
    ..htaccess files.

  2. #12
    gotFusion LLC
    Guest

    Default Re: How to make files available for download automatically?

    ...
    You can use this URL to find out what the underlying server OS is on any
    domain.

    http://uptime.netcraft.com/

    --

    gotFusion Support Team
    ----------------------------------------------------
    Supplemental NetObjects Fusion Product Support
    http://www.gotfusion.com


    "Derek" <no.reply@who.cares> wrote in message
    news:hm6ig6$bf8$1@DailyPlanet.news.netobjects.com. ..
    >
    > Just as a check; try
    >
    > Options +Indexes
    >
    > The + should be optional but the server may be being aggressive... also
    > worth checking that it's an Apache server, not all web servers read
    > ..htaccess files.
    >





  3. #13
    bw
    Guest

    Default Re: How to make files available for download automatically?

    I had tried the Options +Indexes too, and it didn't work.

    The server is running Linux, Apache 2.2.3

    Thanks,

    Brian

    >
    > Just as a check; try
    >
    > Options +Indexes
    >
    > The + should be optional but the server may be being aggressive... also
    > worth checking that it's an Apache server, not all web servers read
    > .htaccess files.




  4. #14
    Derek
    Guest

    Default Re: How to make files available for download automatically?

    On 25/02/2010 23:28, bw wrote:
    > I had tried the Options +Indexes too, and it didn't work.
    >
    > The server is running Linux, Apache 2.2.3
    >
    > Thanks,
    >
    > Brian
    >


    In which case it could be that your administrator has disallowed
    overrides (i.e. knobbled the .htaccess).

    If so, then you're a little stuck. However, assuming the server supports
    PHP then this may work:

    1) Upload the mp3 files to their own folder
    2) Create this PHP script on the server:

    <?php
    foreach (new DirectoryIterator('.') as $fileInfo) {
    $fnm = $fileInfo->getFilename() ;
    if ($fileInfo->isDir()) continue ;
    if (substr(strtolower($fnm), -3) != "mp3") continue ;
    echo "<a href='" . $fnm . ">" . $fnm . "</a><br />" ;
    }
    ?>

    All this does is to list everything in the folder that isn't a directory
    and has 'mp3' (or MP3, or Mp3, or mP3) as the last three characters. It
    wraps an <a> tag around the filename and displays it.

    3) Either a) in a page on the site where you want the listing, add an
    Iframe and specify the location of the script as the URL for the Iframe,
    or b) save the script as 'index.php' and put it in the same folder as
    the mp3 files, then link to that folder.

    No fancy formatting in that script, of course, but it's a quick & dirty
    start - provided the server supports PHP, of course! It probably
    wouldn't be too tough to tweak the script a little to add some CSS styling.

    HTH

    Derek


  5. #15
    bw
    Guest

    Default Re: How to make files available for download automatically?

    Derek,

    That php code works great!! (Some day I need to learn how to write php
    code.)

    Thanks for your help!!

    Brian


    "Derek" <no.reply@who.cares> wrote in message
    news:hm99vr$kv5$1@DailyPlanet.news.netobjects.com. ..
    >
    >
    > If so, then you're a little stuck. However, assuming the server supports
    > PHP then this may work:
    >
    > 1) Upload the mp3 files to their own folder
    > 2) Create this PHP script on the server:
    >
    > <?php
    > foreach (new DirectoryIterator('.') as $fileInfo) {
    > $fnm = $fileInfo->getFilename() ;
    > if ($fileInfo->isDir()) continue ;
    > if (substr(strtolower($fnm), -3) != "mp3") continue ;
    > echo "<a href='" . $fnm . ">" . $fnm . "</a><br />" ;
    > }
    > ?>
    >
    > All this does is to list everything in the folder that isn't a directory
    > and has 'mp3' (or MP3, or Mp3, or mP3) as the last three characters. It
    > wraps an <a> tag around the filename and displays it.
    >
    > 3) Either a) in a page on the site where you want the listing, add an
    > Iframe and specify the location of the script as the URL for the Iframe,
    > or b) save the script as 'index.php' and put it in the same folder as the
    > mp3 files, then link to that folder.
    >
    > No fancy formatting in that script, of course, but it's a quick & dirty
    > start - provided the server supports PHP, of course! It probably wouldn't
    > be too tough to tweak the script a little to add some CSS styling.
    >
    > HTH
    >
    > Derek
    >




  6. #16
    Derek
    Guest

    Default Re: How to make files available for download automatically?

    On 27/02/2010 01:02, bw wrote:
    > Derek,
    >
    > That php code works great!! (Some day I need to learn how to write php
    > code.)
    >
    > Thanks for your help!!
    >
    > Brian


    Brian,

    Great, glad to help. If you've done any other types of programming, PHP
    isn't that tricky to pick up. If not, the learning curve's a bit
    steeper, but it's still pretty easy to do simple things. Try:

    http://www.w3schools.com/php/default.asp

    I've used w3schools for years for different things (they have tutorials
    / references for most web oriented stuff); seems to strike a nice
    balance between being either too basic or frighteningly technical.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •