On Mon, 15 Sep 2003 08:41:31 -0500, Andre created an award-winning crop
circle <20030915134110.25572.qmail@pb1.pair.com>, which, when translated
into English, means this:
> [...]
> I suppose the function opendir() only work for a directory at the same
> server. When someone can tell me what I can do best. Because I just
> started with PHP and I read this code in an example, I realy need some
> help if you tell me to use ftp.
>
> Andre
>
One option would be to create a php script that acts
as a very limited proxy for the opendir() function, e.g.:

my_domain2.com/navigation/opendir.php:
<?php
error_reporting(E_ALL);

header('Content-Type: text/plain');

$dir = opendir('.');
if ($dir) {
while ($ent = readdir($dir)) {
if (ereg('\.html$', $ent)) {
echo $ent . "\n";
}
}
closedir($dir);
}
?>

The above script outputs a list of HTML files
--one on each line.

Let your other script on your local server
contact the opendir.php script:

$fid = fopen('http://my_domain2.com/navigation/opendir.php', 'r')
or die ( ...

Then it's just a matter of reading from the file
and parsing the lines (easy with explode()).

BTW, keep the proxy script limited; you don't
want people to be able to examine any directory on your
server, do you?
> [ rest snipped ]