stream_get_contents Reads remainder of a stream into a string Description stringstream_get_contents resourcehandle intmaxlength Identical to file_get_contents, except that stream_get_contents operates on an already open file resource and returns the remaining contents, up to maxlength bytes, in a string. ¬e.bin-safe; See also: fgets, fread, and fpassthru.