Gets a line from the given handle.
Reading ends when length bytes have been read, when the non-empty string specified by ending is found (which is not included in the return value), or on EOF (whichever comes first).
This function is nearly identical to fgets except in that it allows end of line delimiters other than the standard \n, \r, and \r\n, and does not return the delimiter itself.
A valid file handle.
The maximum number of bytes to read from the handle. Negative values are not supported. Zero (0) means the default socket chunk size, i.e. 8192 bytes.
An optional string delimiter.
Returns a string of up to length bytes read from the file pointed to by stream, or false on failure.