Hi all,
Im having some problems with a ftp connection.
Here is my code
<?php
$conn=ftp_connect("server") or die("COULDNT CONNECT");
if(!ftp_login($conn, "uname", "pass")){
echo "LOGIN FAILED";
die();
}
ftp_pasv($conn, true);
ftp_chdir($conn, 'domains');
ftp_pasv($conn, true);
$list=ftp_raw($conn,'LIST');
$num=count($list);
$x=1;
$y=0;
while($x<=$num){
echo "$list[$y]<br />";
$x=$x+1;
$y=$y+1;
}
ftp_close($conn);
?>
When I run I get
425 Can't open data connection.
This only happens when I use the LISt command in ftp_raw, other command work ok.
Does anyone have any ideas?
Thanks