<?
//$conn_id = ftp_connect($_GET['host'],21,5) or die ('Cant connect to host!');
$conn_id = ftp_connect($_GET['host']) or die ('Cant connect to host!');
ftp_pasv($conn_id, true);
echo 'host OK<br>';
$login_result = ftp_login($conn_id, addslashes($_GET['user']), $_GET['pass']) or die ('Cant connect with username/pass!');
echo 'conect OK<br>Contents there:';
print_r (ftp_nlist($conn_id,"."));
echo '<br />';
if(ftp_put($conn_id, "just-d-test.html", "img/just-d-test.html", FTP_BINARY))
echo 'put OK';
else
print 'put Failed!';
echo "<p><hr>";
echo phpinfo();
?>
I'm having a problem with ftp_nlist being returned as false.
It connects fine but always returns put Failed (false) for the latter task.
I've disabled the firewall in CentOS with no luck. There is nothing specifically disabled in PHP.ini.
I'm using PHP 5.3.3. When I use FileZilla to access the FTP.XXX it loads the directory perfect.
Does anybody have any idea how to make this work please?
This is what i'm getting http://www.uploadaphoto.co.uk/images/untitled.jpg