You can do it by this way
$server = 'anysite.com';
$username = 'username';
$password = 'password';
$local_file = 'original.jpg';
$remote_file = 'uploaded.jpg';
$conn = ftp_connect($server);
$login = ftp_login($conn, $username, $password);
ftp_put($conn, $remote_file, $local_file, FTP_ASCII);
ftp_close($conn);
More info Can be found here
http://altafphp.blogspot.in/2011/06/upload-files-to-remote-server.html