ftp_get()

It downloads a file from the FTP server

Example

<?php

$ftpId = ftp_connect(‘ftp.phpcodez.com’);

$login_result = ftp_login($ftpId, ‘anonymous’, ‘user@phpcodez.com’);

ftp_get($ftpId, “local.text”, ‘server.txt’, FTP_BINARY) or die(“Failed”);

ftp_close($ftpId);

?>

Share