ftp_connect

$ftp_conn = ftp_connect($host) or die("Could not connect to server");
$login = ftp_login ($ftp_conn, $user, $password);

I am pretty sure that ftp_connect isn’t recommended from a security point of view, and probably hasn’t been for a couple of hundred years.

Having said that, it turns out that when a third party says ‘to hell with the security concerns’, and only gives you access to FTP for an order process it’s pretty straight forward to connect with the PHP I’m putting together.

Fun.