WordPress at Your Fingertips
function is not described

ftp_pure::_readmsg() public WP 1.0

{} It's a method of the class: ftp_pure{}

No Hooks.

Return

null. Nothing.

Usage

$ftp_pure = new ftp_pure();
$ftp_pure->_readmsg( $fnction );
$fnction **
-
Default: "_readmsg"

Code of ftp_pure::_readmsg() WP 5.8.2

function _readmsg($fnction="_readmsg"){
	if(!$this->_connected) {
		$this->PushError($fnction, 'Connect first');
		return FALSE;
	}
	$result=true;
	$this->_message="";
	$this->_code=0;
	$go=true;
	do {
		$tmp=@fgets($this->_ftp_control_sock, 512);
		if($tmp===false) {
			$go=$result=false;
			$this->PushError($fnction,'Read failed');
		} else {
			$this->_message.=$tmp;
			if(preg_match("/^([0-9]{3})(-(.*[".CRLF."]{1,2})+\\1)? [^".CRLF."]+[".CRLF."]{1,2}$/", $this->_message, $regs)) $go=false;
		}
	} while($go);
	if($this->LocalEcho) echo "GET < ".rtrim($this->_message, CRLF).CRLF;
	$this->_code=(int)$regs[1];
	return $result;
}