Hi, My hosting company have stopped ftp via php so the below has stopped working. I cannot use move upload file due to the function being on a different server. I was thinking about http file transfer or any alternative you can think of but what would need to be changed on the below? function ftpupload($file, $img_tmp, $path){ $message = ''; if ($ftp = ftp_connect("119.159.171.179")) { if (ftp_login($ftp, "username", "pass")) { ftp_pasv($ftp, true); ftp_put($ftp, $path.$file, $img_tmp, FTP_BINARY); } else { die("Could not login to FTP account"); } } else { die("Could not connect to FTP server"); } ftp_close($ftp); } PHP: Thank you in advance. Adam
Get a new host. They shouldn't be disabling functions like ftp. I can see some of the basis for restricting system or exec, although they should be able to segment a hosting platform enough to still operate safely. Preventing ftp is just ridiculous. You shouldn't have to try and work around basic php functionality.
It appears from closer inspection that the problem is not due to the restriction of FTP via PHP but a limitation of the amount of connections being made. What seems to happen is a user uploads several images via the above function and then it slows right down or even comes to a stand still. Is there any way around this?