I've searched for a whole day but I can't find anything that gives me a definite answer.
I have a script on one server that is supposed to read the contents of a directory on a remote server. The directory's permissions are setup to allow directory listing.
Here is the code:
$dir='http://www.myweb/new/';
if($dirname = opendir("$dir"))
echo "Directory was opened!";
else
echo "Can't open $dir";
All I get is "Can't open http://www.myweb/new/". I even tried this the other way around, server B reading server A, and it still won't work.
What is the problem here? Is this just not possible? I read the manual here and it says URLs should be able to be open this way http://us3.php.net/manual/en/function.opendir.php
I would appreciate any advice.
Thanks!