- substr: documentation ( source)
- strpos: documentation ( source)
- print_r: documentation ( source)
<?php
$html = "<html><body> vdfbsdbg \n </body> \n </html>";
$pos = strpos($html, '</body>');
if ($pos !== false) {
$html = substr($html, 0, $pos);
$html = $html . '==IMG==' . substr($html, $pos);
print_r($html);
}