====== read ====== {#JAPI Joomla.Framework Client JFTP::read #} This method reads a file from the FTP server's contents into the specified buffer. This method returns true if successful, false otherwise. ===== Syntax ===== boolean read ( **$remote**, **&$buffer** ) | **$remote** | string | is a string containing the path to remote file to read on the FTP server. | | **$buffer** | string | is a buffer variable to read the contents of the file into. | ===== Examples ===== jimport( 'joomla.connector.ftp' ); $ftp = new JFTP( array( 'type' => FTP_BINARY ) ); $ftp->connect( '127.0.0.1' ); $ftp->login( 'testuser', 'testpass' ); $buffer = ''; $ftp->read( 'test/robots.txt', $buffer ); echo $buffer; might produce: User-agent: * Disallow: /administrator/ Disallow: /cache/ Disallow: /components/ Disallow: /editor/ Disallow: /help/ Disallow: /images/ Disallow: /includes/ Disallow: /language/ Disallow: /mambots/ Disallow: /media/ Disallow: /modules/ Disallow: /templates/ Disallow: /installation/