Posted By

Leech on 10/12/08


Tagged

php files send FTP


Versions (?)

Who likes this?

6 people have marked this snippet as a favorite

jamesming
luman
garretjames
vali29
silentbob84
jameshernandez


Send Files via FTP Using PHP


 / Published in: PHP
 

URL: http://davidwalsh.name/send-files-ftp-php

  1. <?php
  2.  
  3. $connection = ftp_connect($server);
  4. $login = ftp_login($connection, $ftp_user_name, $ftp_user_pass);
  5. if (!$connection || !$login) { die('Connection attempt failed!'); }
  6. $upload = ftp_put($connection, $dest, $source, $mode);
  7. if (!$upload) { echo 'FTP upload failed!'; }
  8. ftp_close($connection);
  9.  
  10. ?>

Report this snippet  

You need to login to post a comment.