Remote directory file listing?

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
SleepyP
Forum Newbie
Posts: 14
Joined: Wed Apr 21, 2004 7:30 pm

Remote directory file listing?

Post by SleepyP »

This seems like a longshot, but is there any way for a PHP script to retrieve a list of filenames for a remote directory (i.e. http://www.somedomain.com/somedir/) ? i would think this impossible but it would be really nice if it is possible....
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

depending on what kind of access your server/you have to the other server, php could ftp or telnet in and get the list.. If you have no relation to the remote site, the best you can do (without getting into serious trouble is scan all their public files for references to that specific directory. Either way.. a bit of a pain... and potentially violating that site's usage agreements.
Post Reply