note 107187 added to function.get-meta-tags

From: Date: Fri, 13 Jan 2012 05:17:46 +0000
Subject: note 107187 added to function.get-meta-tags
Groups: php.notes 
Request: Send a blank email to php-notes+get-185627@lists.php.net to get a copy of this message
This is similar to jstel's function, except that it returns one meta tag per array element. <?php function getMetaData($content) { $content = preg_replace("'<style[^>]*>.*</style>'siU",'',$content); // strip js $content = preg_replace("'<script[^>]*>.*</script>'siU",'',$content); // strip css preg_match_all("/<meta[^>]+(http\-equiv|name|property)=\"([^\"]*)\"[^>]" . "+content=\"([^\"]*)\"[^>]*>/i", $content, $split_content,PREG_SET_ORDER); return $split_content; } ?> ---- Server IP: 69.147.83.197 Probable Submitter: 99.61.115.10 ---- Manual Page -- http://www.php.net/manual/en/function.get-meta-tags.php Edit -- https://master.php.net/note/edit/107187 Del: integrated -- https://master.php.net/note/delete/107187/integrated Del: useless -- https://master.php.net/note/delete/107187/useless Del: bad code -- https://master.php.net/note/delete/107187/bad+code Del: spam -- https://master.php.net/note/delete/107187/spam Del: non-english -- https://master.php.net/note/delete/107187/non-english Del: in docs -- https://master.php.net/note/delete/107187/in+docs Del: other reasons-- https://master.php.net/note/delete/107187 Reject -- https://master.php.net/note/reject/107187 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#185627) next »