$status=@
fputs($this->_ftp_control_sock,
$cmd.CRLF
);
if($status===false
) { $this->
PushError($fnction,'socket write failed'
);
return FALSE;
} $this->_lastaction=
time();
if(!
$this->
_readmsg($fnction)) return FALSE;
return TRUE;
} function _data_prepare($mode=FTP_ASCII
) { if(!
$this->
_settype($mode)) return FALSE;
if($this->_passive
) { if(!
$this->
_exec("PASV", "pasv"
)) { $this->
_data_close();
return FALSE;
} if(!
$this->
_checkCode()) { $this->
_data_close();
return FALSE;
} $ip_port =
explode(",",
preg_replace("/^.+ \\(?([0-9]{1,3},[0-9]{1,3},[0-9]{1,3},[0-9]{1,3},[0-9]+,[0-9]+)\\)?.*$/s", "\\1",
$this->_message
));
$this->_datahost=
$ip_port[0
].".".
$ip_port[1
].".".
$ip_port[2
].".".
$ip_port[3
];