PHP: How to get meta tags from a webpage

A simple php function which help you fetch meta tags from a webpage. We will use get_meta_tags function:

$tags = get_meta_tags('');

echo $tags['author'];       // Meta author name
echo $tags['keywords'];     // Meta keywords
echo $tags['description'];  // Meta Description
echo $tags['geo_position']; // Meta geo Position

And to avoid 404 header response code, you can add an additional function to check header code:
Continue reading “PHP: How to get meta tags from a webpage”