I am trying to make a php program that will connect to an ftp and then list all the files that are on that server my code is this
$ftp = ftp_connect("24.197.197.227", "1490");
ftp_login($ftp, "nottelling", "youwish");
print "User Logged In";
foreach(ftp_nlist($ftp, ".") as $filename)
{
print ("$filename<br>\n");
}
as you can see I attempted to use port 1490. now I am trying this from work and work has a firwall. but the php server I use is at home and when I run an FTP from the prompt it works fine and I have a server at home on port 673 and it works fine as well but everytime I run it for this port it says:
User Logged In
Warning: Invalid argument supplied for foreach() in /website/ftp.php on line 5
and advice?
Thanks,
JOhn