Forum Moderators: coopster
<?php
$conn_id = ftp_connect("ftp.mysite.com")or die ("Can't connect to FTP Server");
echo'successful connection';
ftp_close($conn_id);
?>
When called, I get the "Can't connect.." - the die statement. I would appriciate any suggestions.
<?php
ini_set('displat_errors',1);
error_reporting(E_ALL & ~E_NOTICE);
$ftp_login = 'login';
$ftp_password = 'password';
$conn_id = ftp_connect("ftp.mysite.com",21)or die ("Can't connect to FTP Server");
$login_result = ftp_login($conn_id, $ftp_login, $ftp_password)or die ("Can't login to FTP Server");
echo'successful connection';
ftp_close($conn_id);
?>
Any suggestions?
I have tried "firewall.mysite.com also without success. can not get past the ftp_connect() command. It keeps going to the die command.
I am having same issues, I'm running some PHP code to remotely connect (FTP) to another 3rd party webhosting company. I also get failed to connect every time with code very similar to yours. I'm still working on it and when I get it figured out, I'll post results here. Please do the same!
Thanks