Opendir

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
sclozza
Forum Newbie
Posts: 14
Joined: Wed Oct 09, 2002 5:11 am

Opendir

Post by sclozza »

I have been trying to get an image randomising script I found to work (and it works well!) but to get it to retireve the list of files from another http server I have space on. After reading the manual entries for opendir() at php.net I have discovered it could not be done. What are the alternatives?


Thanks.
User avatar
volka
DevNet Evangelist
Posts: 8391
Joined: Tue May 07, 2002 9:48 am
Location: Berlin, ger

Post by volka »

to let the other server provide that list.
e.g. by default directory listing of the webserver or ftp-access or a script that provides the listing or ...
Depends on your access level at this server ;)
sclozza
Forum Newbie
Posts: 14
Joined: Wed Oct 09, 2002 5:11 am

Post by sclozza »

volka wrote:to let the other server provide that list.
e.g. by default directory listing of the webserver or ftp-access or a script that provides the listing or ...
Depends on your access level at this server ;)
I was actually thinking of letting the other server handle all of it and just have a small redorect script at my end. But because I took the free option, I dont get PHP support :/.

I was thinking of finding another free server that had PHP and ~20+ Mb of space.

I am a bit of a n00b at PHP etc. What does default directory listing mean?

Thanks.
User avatar
BigE
Site Admin
Posts: 139
Joined: Fri Apr 19, 2002 9:49 am
Location: Missouri, USA
Contact:

Post by BigE »

The default directory listing would be when you type in http://www.somesite.com/folder/ and all you see is a list of everything in the folder. Yes, the only way your going to get the contents of a remote DIR is if they show this folder listing or you have some kind of FTP access to it.
sclozza
Forum Newbie
Posts: 14
Joined: Wed Oct 09, 2002 5:11 am

Post by sclozza »

BigE wrote:The default directory listing would be when you type in http://www.somesite.com/folder/ and all you see is a list of everything in the folder. Yes, the only way your going to get the contents of a remote DIR is if they show this folder listing or you have some kind of FTP access to it.
Thank you for your reply. I do have full FTP access to this particular server (well as far as my account is concerned, 50Mb or something).
User avatar
BigE
Site Admin
Posts: 139
Joined: Fri Apr 19, 2002 9:49 am
Location: Missouri, USA
Contact:

Post by BigE »

Then might I suggest you check out the FTP functions that are built into PHP. php.net/ftp I hope that helps.
sclozza
Forum Newbie
Posts: 14
Joined: Wed Oct 09, 2002 5:11 am

Post by sclozza »

Thank you for your advice
Post Reply