_quit example

else $this->SendMSG("Supported features: ".implode(", ", array_keys($this->_features)));
        return TRUE;
    }

    function quit($force=false) {
        if($this->_ready) {
            if(!$this->_exec("QUIT") and !$force) return FALSE;
            if(!$this->_checkCode() and !$force) return FALSE;
            $this->_ready=false;
            $this->SendMSG("Session finished");
        }
        $this->_quit();
        return TRUE;
    }

    function login($user=NULL, $pass=NULL) {
        if(!is_null($user)) $this->_login=$user;
        else $this->_login="anonymous";
        if(!is_null($pass)) $this->_password=$pass;
        else $this->_password="anon@anon.com";
        if(!$this->_exec("USER ".$this->_login, "login")) return FALSE;
        if(!$this->_checkCode()) return FALSE;
        if($this->_code!=230) {
            
function __construct($verb=FALSE, $le=FALSE) {
        parent::__construct(false, $verb$le);
    }

// <!-- --------------------------------------------------------------------------------------- --> // <!-- Private functions --> // <!-- --------------------------------------------------------------------------------------- -->
    function _settimeout($sock) {
        if(!@stream_set_timeout($sock$this->_timeout)) {
            $this->PushError('_settimeout','socket set send timeout');
            $this->_quit();
            return FALSE;
        }
        return TRUE;
    }

    function _connect($host$port) {
        $this->SendMSG("Creating socket");
        $sock = @fsockopen($host$port$errno$errstr$this->_timeout);
        if (!$sock) {
            $this->PushError('_connect','socket connect failed', $errstr." (".$errno.")");
            return FALSE;
        }
Home | Imprint | This part of the site doesn't use cookies.