By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
438,303 Members | 1,245 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 438,303 IT Pros & Developers. It's quick & easy.

Getting file names on another server with PHP

P: n/a
My ISP provides me with minimal space on a dedicated server running
PHP, and 250MB on a separate HTTP server.

I'm trying to make a gallery using PHP. The script is held on the PHP
server, and the thumbnails and images are on the separate HTTP server.
Ideally I'd like to be able to get a listing of the contents of the
HTTP server where the images are stored. I want to do this so that
when I add/delete/change images, the dynamic nature of the site just
picks up the new files and I don't have to maintain a separate
database of the image names and where they're stored.

Any help would be gratefully received.

Jul 17 '05 #1
Share this Question
Share on Google+
2 Replies


P: n/a
Roger wrote:
My ISP provides me with minimal space on a dedicated server running
PHP, and 250MB on a separate HTTP server.

I'm trying to make a gallery using PHP. The script is held on the PHP
server, and the thumbnails and images are on the separate HTTP server.
Ideally I'd like to be able to get a listing of the contents of the
HTTP server where the images are stored. I want to do this so that
when I add/delete/change images, the dynamic nature of the site just
picks up the new files and I don't have to maintain a separate
database of the image names and where they're stored.


Use the FTP-access to list the files.

greetings, Christian
Jul 17 '05 #2

P: n/a
> Ideally I'd like to be able to get a listing of the contents of the
HTTP server where the images are stored. I want to do this so that


The best solution is try to have your ISP share out the partition. This way
you essentially can access the directory of images over the network.

If this is not an option, what you will do is simple. Create a script on the
machine that holds the images. It will list the directory contents and
return a textual list or a serialized object / array. You will access the
script by way of http.

--Wil
Jul 17 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.