biwerw Posted May 15, 2009 Share Posted May 15, 2009 Is it possible to display a list of files with thumbnails in a directory on an FTP server different than where the website is hosted? Quote Link to comment Share on other sites More sharing options...
gffg4574fghsDSGDGKJYM Posted May 15, 2009 Share Posted May 15, 2009 PHP have ftp tools you can use to download, resize the thumbnails (gd) and save them local. It always depend on how many images you have but i'm not sure you can do this without being kicked by the timeout or the user will close the window thinking your site doesn't work or the browser may display a timeout even if your script work and you increase the time limit. http://www.php.net/manual/en/book.ftp.php http://www.php.net/manual/en/ref.image.php You can also created a cron job that run each x hours and connect to the ftp, download the file, makes thumbnails and make a 'static' html file. Some sort of a html mirror of a ftp. Quote Link to comment Share on other sites More sharing options...
nadeemshafi9 Posted May 15, 2009 Share Posted May 15, 2009 <?php // set up basic connection $conn_id = ftp_connect('ftp.example.com'); // login with username and password $login_result = ftp_login($conn_id, $ftp_user_name, $ftp_user_pass); // get contents of the current directory $contents = ftp_nlist($conn_id, "."); // replace dot with your dir // output $contents print_r($contents); ?> Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.