The function file_get_contents() loads all the contents of a file into a string.
Use:
$file = fopen("file.txt", "r");
$file_contents = fgets($file, 100000); //Limits to 100KB
fclose($file);
$file_contents will have 100KB worth of data from the top of the specified file (file.txt in this case).