PhP to get meta data from a website

Comments Off    Share on Facebook

I have to say this is freakin sweet, especially if you have a links page to capture description data, etc.  Here is the code

// Assuming the above tags are at
$tags = get_meta_tags(‘’);

// Notice how the keys are all lowercase now, and
// how . was replaced by _ in the key.
echo ‘author=’.$tags[‘author’].'<br><br>';       // name
echo ‘keywords=’.$tags[‘keywords’].'<br><br>';     // php documentation
echo ‘description=’.$tags[‘description’].'<br><br>';  // a php manual
echo ‘geo_position=’.$tags[‘geo_position’].'<br><br>'; // 49.33;-86.59

Comments are closed.