Regex can do the trick. Note that I've used the "s" flag, so a "." includes new lines - normally the first capture group would start at the beginning of the current line, rather than the beginning of all text:
echo preg_replace('/.*(?<=<body>)(.*)(?=<\/body>).*/s', '$1' ,$data); // get body text only