Lieber dedlfix,
preg_match('|<body.?>(.)</body>|', $file, $matches);
echo htmlspecialchars($matches[1]);$bodystart = strpos($file, '>', strpos($file, '<body')) + 1;
$bodyend = strpos($file, '</body>') - $bodystart;
echo htmlspecialchars(substr($file, $bodystart, $bodyend));
warum nicht einfach
~~~php
$meine_html_datei = "pfad/zur/datei.html";
$html_body = preg_replace("|(?is)<body[^>]*>(.*)</body>|", "\\1", implode("", file($meine_html_datei)));
Liebe Grüße aus Ellwangen,
Felix Riesterer.