Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # Backuper FTP Class
- class Backuper_FTP {
- protected $ftphost;
- protected $ftpuser;
- protected $ftppass;
- protected $connection;
- # Constructor
- public function __construct($username, $password) {
- $this->ftphost = "ftp01.sitedump.com";
- $this->ftpuser = $username;
- $this->ftppass = $password;
- }
- # Connect to server
- public function connect() {
- # Connect to FTP server
- $this->connection = ftp_connect($this->ftphost);
- return (bool) $this->connection;
- }
- # Login to server
- public function login() {
- if(@ftp_login($this->connection, $this->ftpuser, $this->ftppass))
- return true;
- else
- return false;
- }
- }
Add Comment
Please, Sign In to add comment