Guest User

Untitled

a guest
Aug 2nd, 2018
133
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.60 KB | None | 0 0
  1. # Backuper FTP Class
  2. class Backuper_FTP {
  3.  
  4. var $ftphost;
  5. var $ftpuser;
  6. var $ftppass;
  7.  
  8. # Constructor
  9. function __construct($username, $password) {
  10.  
  11. $this->ftphost = "ftp01.sitedump.com";
  12. $this->ftpuser = $username;
  13. $this->ftppass = $password;
  14. }
  15.  
  16. # Connect to server
  17. function connect() {
  18.  
  19. # Connect to FTP server
  20. $conn_id = ftp_connect($this->ftphost);
  21.  
  22. if(!$conn_id)
  23. return false;
  24. else
  25. return true;
  26. }
  27.  
  28. # Login to server
  29. function login() {
  30.  
  31. if(@ftp_login($conn_id, $this->ftpuser, $this->ftppass))
  32. return true;
  33. else
  34. return false;
  35. }
  36. }
Add Comment
Please, Sign In to add comment