Get Metatags from Website with PHP
Today i wanna show you how you can build a little SEO tool for your website.
With that tool you can read the Metatags from a website. Ok, it is not a real SEO tool
but maybe you find this helpfull. Actually the only thing you need is the command get_meta_tags.
<?php
// Assuming the tags are at www.phpmysqlforum.com
$tags = get_meta_tags(’http://www.phpmysqlforum.com/’);
echo $tags[’author’]; // get the author name
echo $tags[’keywords’]; // get the keywords
echo $tags[’description’]; // get the descripton of the site
?>
Of cause there are some more parameter you can check.
This will work with php4 and php5.