Php has a built in function get_meta_tags() which extracts all meta tags of a webpage and retuns an array of it. It takes a minimum of one parameter (the path of the webpage). which can be local or an external webpage from other site.
It parses the webpage line by line for meta and stops when it gets </head> tag.
One thing to note here that It only extracts those meta which has name attribute set.
It parses the webpage line by line for meta and stops when it gets </head> tag.
One thing to note here that It only extracts those meta which has name attribute set.
$metas = get_meta_tags('http://www.id-script.com');
echo "<pre>";
print_r($metas);
echo "</pre>";
Posting Komentar