Best approach for creating a list of downloads on a website from the contents on our FTP

Posted on 2005-05-13
Last Modified: 2008-03-06
Hello experts :)

I manage our company website and im looking for information on the best approach to create a list of downloads in our "software section" of the website. This list should be populated from the contents of a folder on our FTP site.

Im not asking to be spoon fed, but a point in the right direction would certainly help.

Thanks guys!
Question by:chris84
    LVL 49

    Accepted Solution

    Do you want to give additional titles to the available files, or do you need just a listing of the files available?

    In the second case you could use:

      $path = 'path_to_my_ftp_dir'; //$path = dirname(__FILE__).'/downloads/';
      $href = 'url_to_my_ftp_dir'; //$path = '';

      if(!is_dir($path))  //Directory not found
         echo 'No downloads';
      elseif(false === ($d = opendir($path))) //Directory could not be opened for whatever reason
         echo 'No downloads';
          echo '<b>Available downloads</b><ul>';
          while(false !== ($f = readdir($d)))
               if(is_file($path.'/'.$f))  //show only files
                 echo '<li><a href="'.$href.'/'.htmlspecialchars($f).'">'.htmlspecialchars($f).'</a></li>';
          echo '</ul>';

    LVL 6

    Expert Comment

    if you are using a html interface for the files, take a look at:

          WebExplorer Lite
          Copyright © 2000-2004 GleamTech


    Featured Post

    How your wiki can always stay up-to-date

    Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
    - Increase transparency
    - Onboard new hires faster
    - Access from mobile/offline

    Join & Write a Comment

    Using SQL Scripts we can save all the SQL queries as files that we use very frequently on our database later point of time. This is one of the feature present under SQL Workshop in Oracle Application Express.
    Read about why website design really matters in today's demanding market.
    The viewer will learn how to count occurrences of each item in an array.
    Any person in technology especially those working for big companies should at least know about the basics of web accessibility. Believe it or not there are even laws in place that require businesses to provide such means for the disabled and aging p…

    734 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    19 Experts available now in Live!

    Get 1:1 Help Now