Get the keywords of a site using php

From The IT Community
Jump to: navigation, search

If you are doing SEO or want to show some data about another site, there may be a scenario where you want to display the keywords of another site.

Using PHP this is actually pretty simple. Here is how to get the keywords of a site using php:

$metatags = get_meta_tags('');
echo $metatags['keywords'];

Just put this in the body of your php file and replace ' with the URL you want to check.

That is it, if the site you want to check has keywords set, than these command will display them

Was this article helpful? Then please donate to keep The IT Community alive...

If you found this article helpful please share it, comment and help others by writing your own article.

Translate this page:

Articles found in the same category:
(max. 20 shown)