I’m trying to open a folder from a distant server. I wrote :
if ($folderHandle = opendir($folder))
where $folder = "ftp://xxx:xxx@xxx.net:21"
I get the weird error Warning: opendir(ftp://...:21): failed to open dir: operation failed in ... on line 38
Any ideas as to where I should go from here ? Is it a problem with the FTP credentials ?
You could use PHP’s FTP Capabilities to remotely connect to the server and get a directory listing: