_data_prepare example


        if($exists) $this->SendMSG("Remote file ".$pathname." exists");
        else $this->SendMSG("Remote file ".$pathname." does not exist");
        return $exists;
    }

    function fget($fp$remotefile$rest=0) {
        if($this->_can_restore and $rest!=0) fseek($fp$rest);
        $pi=pathinfo($remotefile);
        if($this->_type==FTP_ASCII or ($this->_type==FTP_AUTOASCII and in_array(strtoupper($pi["extension"])$this->AutoAsciiExt))) $mode=FTP_ASCII;
        else $mode=FTP_BINARY;
        if(!$this->_data_prepare($mode)) {
            return FALSE;
        }
        if($this->_can_restore and $rest!=0) $this->restore($rest);
        if(!$this->_exec("RETR ".$remotefile, "get")) {
            $this->_data_close();
            return FALSE;
        }
        if(!$this->_checkCode()) {
            $this->_data_close();
            return FALSE;
        }
        
Home | Imprint | This part of the site doesn't use cookies.