I am getting the content of a web-page using file_get_contents and part of the body tag remains in the output. I am also using strip_tags() to remove other html tags, but the partial body tag remains.
How can I remove it?
The output I am getting is body> and then content.
Here is my code:
$content = file_get_contents( $url );
$content = stristr( $content, "body" );
echo strip_tags($content);