I'm trying to DL a file from one server to another.
$ftpHandle = ssh2_connect('ftp.remoteServer.net', 22)
ssh2_auth_password($ftpHandle, $userName, $password)
After a successful connection and login, I run this:
$dir = "/dl";
$handledir = opendir($dir);
But of course, this fails...and I don't know why. It says the folder doesn't exist. /dl is the absolute path on the remote server.
I have a feeling that "opendir" is looking on my local server (where this is being run), and not the remote one.
The goal here is to look in this folder and DL every file in the folder. After it downloads, it can delete it off of the remote server.