How in the earth stream_get_contents is undefined? I thought it's built in?
It is, but only if you are running PHP5.
Aw.... So, what's the alternative?
From the manual ... which is also where I found out it is a PHP5 function ...
Description string stream_get_contents ( resource $handle [, int $maxlength [, int $offset]] ) Identical to file_get_contents(), except that stream_get_contents() operates on an already open stream resource and returns the remaining contents in a string, up to maxlength bytes and starting at the specified offset.
Description string stream_get_contents ( resource $handle [, int $maxlength [, int $offset]] )
Identical to file_get_contents(), except that stream_get_contents() operates on an already open stream resource and returns the remaining contents in a string, up to maxlength bytes and starting at the specified offset.
file_get_contents doesn't support timeout.