One way is to use regexp.
Here is another way:
//find body tag
$iPos1 =3D strpos($htmldata, "<body");
//find closing tag
$iPos1 =3D strpos($htmldata, ">", $iPos1) + 1;
//find </body>
$iPos2 =3D strpos($htmldata, "</body>") - 1;
//find string
$yourText =3D substr($htmldata, $iPos1, $iPos2 - $iPos1);
-----Ursprungligt meddelande-----
Fr=E5n: Paul [mailto:paul@d...]
Skickat: den 9 december 2002 09:23
Till: professional php
=C4mne: [pro_php] Re: SV: HTML tags and SSI
"This function tries to return a string with all HTML and PHP tags
stripped from a given /str/." I was hoping to only remove the header
and footer tags, but to leave all of the other formating tags in place.
Either PHP or SSI would be fine. Am I going to have to script this
myself?
Datatal AB - Gauffin, Jonas wrote:
>Nope. You gotto use php.
>http://www.php.net/manual/en/function.strip-tags.php
>
>-----Ursprungligt meddelande-----
>Fr=E5n: Paul [mailto:paul@d...]
>Skickat: den 9 december 2002 09:06
>Till: professional php
>=C4mne: [pro_php] HTML tags and SSI
>
>
>When using server-side includes (SSI), is there a way to have the
server
>automatically strip out the html, head, and body tags of the file being
>included?
>
>
>