View Single Post
Old 10-09-2003, 05:41 PM   #2
Charter
Head Mole
 
Charter's Avatar
 
Join Date: May 2003
Posts: 2,539
Quote:
PHP Code:
//delete content of head, script, and style tags
$text eregi_replace("<head[^<>]*>.*</head>"," ",$text);
$text eregi_replace("<script[^>]*>.*</script>"," ",$text);
$text eregi_replace("<style[^>]*>.*</style>"," ",$text);
// clean tags
$text eregi_replace("(</?[a-z0-9 ]+> )",'\\1 ',$text); 
Hi. If you want to strip META tags, perhaps add something like:
PHP Code:
$text eregi_replace("<meta[^>]*>"," ",$text); 
__________________
Responses are offered on a voluntary if/as time is available basis, no guarantees. Double posting or bumping threads will not get your question answered any faster. No support via PM or email, responses not guaranteed. Thank you for your comprehension.
Charter is offline   Reply With Quote