Click to See Complete Forum and Search --> : readdir


Salam
12-01-2004, 06:42 AM
Hi, can I use opendir and readdir in order to read the file names in a certain directory on a diffrent server ? so the PHP file will be running on a server different than the one the directory is on.

pti4ka
12-01-2004, 08:40 AM
read here:
http://www.php.net/manual/en/function.opendir.php
taken from above link:

As of PHP 4.3.0 path can also be any URL which supports directory listing, however only the file:// URL wrapper supports this in PHP 4.3. As of PHP 5.0.0, support for the ftp:// URL wrapper is included as well

Salam
12-01-2004, 06:14 PM
Thank you pti4ka for your repply. Actually I read that before I posted my question.

I understand that I can't use "http://....". On the other hand, the PHP installed on the server is 4.3.8 which rules out "ftp://...". That leaves for me "file://..." which I never heared of before. I tried "file://www.xxx.com" but did not work. I ended up not knowing what am I missing