Having put your file into an array (with the file() function), why not just cycle through the array, picking out the line containing the 'open' body tag, and the the line containing the 'close' body tag. (I use the preg_match() function ... the regex can be made to be case-insensitive ... e.g.)
Everything in-between is the contents ... you might also have to see what text comes after <body> on the 'open' body tag line and what comes before </body> on the 'close' body tag line.
The only other thing is that you are assuming that the body tag does not have any attributes (like color="#FF0000") of its own. But that's for another day ...
So,
$file_array = file("preg.html");
$contents_string = "";
$open_body_found = false;
for($i = 0; $i < count($file_array); $i++){
$line = $file_array[$i];
if(preg_match("/<body>/i", $line)){
$tmp = explode("<body>", $line);
$contents_string .= $tmp[1]; // After <body>
$open_body_found = true;
} else if(preg_match("/<\/body>/i", $line)){
$tmp = explode("</body>", $line);
$contents_string .= $tmp[0]; // Pre </body>
break;
} else if($open_body_found){
$contents_string .= $line;
}
}
echo $contents_string;