Guest User

Untitled

a guest
Aug 8th, 2018
137
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.49 KB | None | 0 0
  1. <?php
  2.  
  3. $ftp_server = "ftp.worolol.com";
  4. $ftp_user = "worolol";
  5. $ftp_pass = "worolol123";
  6.  
  7. // set up basic connection
  8. $conn_id = ftp_connect($ftp_server);
  9.  
  10. // login with username and password
  11. $login_result = ftp_login($conn_id, $ftp_user, $ftp_pass);
  12.  
  13. // turn passive mode on
  14. ftp_pasv($conn_id, true);
  15.  
  16.     foreach (glob("testfolder/*.*") as $filename)
  17.         {
  18.             ftp_put($conn_id, basename($filename) , $filename, FTP_BINARY);
  19.         }
  20.  
  21. // close the connection
  22. ftp_close($conn_id);
  23. ?>
Add Comment
Please, Sign In to add comment