He is going to want to strip stuff *inbetween* <script> tags for example,
not just strip the tags themselves...

<script>
somefunction {
    ...
}
</script>

strip tags would result in

somefunction {
    ...
}

what he really needs is to completely remove <script>...</script>, plus many
many other examples.

completely removing everything outside the body would be another option,
perhaps saving the contents of <title>...</title>


Justin French




on 21/09/02 12:27 AM, [EMAIL PROTECTED] ([EMAIL PROTECTED]) wrote:

> strip_tags() is the easiest way to remove HTML tags. If he wants to replace
> them, then he can use ereg_replace or preg_replace().
> 
> --
> 
> Nicos - CHAILLAN Nicolas
> [EMAIL PROTECTED]
> www.WorldAKT.com - Hébergement de sites Internet
> 
> "Justin French" <[EMAIL PROTECTED]> a écrit dans le message de news:
> [EMAIL PROTECTED]
>> There's a perfect example in the manual:
>> http://www.php.net/manual/en/function.preg-replace.php
>> 
>> HTH
>> Justin
>> 
>> 
>> on 20/09/02 9:16 PM, SiTA WebMaster - VST ([EMAIL PROTECTED]) wrote:
>> 
>>> Try to remove all strings starting with "<" and ending with ">". Be sure
>>> not to remove "<A href ... ></A>"'s. Also you need to format line
>>> endings via "\n" or "<BR>".
>>> 
>>> it might seem a little bit hard, but any other solution won't work
>>> rather than this.
>>> 
>>> Tim Haynes wrote:
>>> 
>>>> Does anybody know of a class or a solution to converting an HTML page
> to a
>>>> text only page via PHP, but leaving in href links in and a certain
> degree of
>>>> formatting.
>>>> 
>>>> Cheers,
>>>> 
>>>> Tim
>>>> 
>>>> 
>>>> 
>> 
> 
> 


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to