Advertisement
Guest User

Untitled

a guest
Oct 5th, 2016
76
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.68 KB | None | 0 0
  1. <?php
  2. // connect and login to FTP server
  3. $ftp_server = "ftp.sciera.net";
  4. $ftp_username = "bixuser"; // Username
  5. $ftp_userpass = "ASMPwt"; // Password
  6.  
  7. $ftp_conn = ftp_connect($ftp_server) or die("Could not connect to $ftp_server");
  8.  
  9. $login = ftp_login($ftp_conn, $ftp_username, $ftp_userpass);
  10.  
  11. if (isset($argv[1])) {
  12. echo "Local File: " . $argv[1]. PHP_EOL;
  13. }
  14. if (isset($argv[2])) {
  15. echo "Server File: " . $argv[2]. PHP_EOL;
  16. }
  17.  
  18.  
  19. // download server file
  20. if (ftp_get($ftp_conn,$argv[1],$argv[2],FTP_BINARY,0))
  21. {
  22. echo "Successfully written to $argv[1]." . PHP_EOL;
  23. }
  24. else
  25. {
  26. echo "Error downloading $argv[2].";
  27. }
  28. exec('"C:\Program Files\7-Zip\7zG.exe" e "c:\silkinput"');
  29. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement