![]() |
Returns an array with all the parsed meta tags. The value of the name property becomes the key, the value of the content property becomes the value of the returned array, so you can easily use standard array functions to traverse it or access single values. Special characters in the value of the name property are substituted with '_', the rest is converted to lower case. If two meta tags have the same name, only the last one is returned. Returns |
Just follow Example.
Example:
PHP
<?php
// Assuming the above tags are at www.example.com
$tags = get_meta_tags('https://www.metkovicnet.com');
// Notice how the keys are all lowercase now, and
// how . was replaced by _ in the key.
echo $tags['author']; // name
echo '</br>';
echo $tags['keywords']; // php documentation
echo '</br>';
echo $tags['description']; // a php manual
echo '</br>';
echo $tags['geo_position']; // 49.33;-86.59
echo '</br>';
echo $tags['og:image']; // 49.33;-86.59
echo '</br>';
?>
How to extract Domain Name from Full URL in PHP | PHP Extract Tutorial |
How to extract only name from domain in PHP | PHP Extract Tutorial |
How to extract All url from a single page by PHP | PHP Extract Tutorial |
How to get first Five Line from CSV File | PHP Extract Tutorial |
How to get first 100 records from a csv file in PHP | PHP Extract Tutorial |
How to get meta Tag | PHP Extract Tutorial |
How to get title description image and multiple images from URL | PHP Extract Tutorial |
How to read a txt file from a zip remote URL | PHP Extract Tutorial |
How to extract all url from a html single page in PHP | PHP Extract Tutorial |
How to extract Keyword Description Author from Meta Tag a HTML Page using URL | PHP Extract Tutorial |
Read Full: | PHP Extract Tutorial |
Category: | Web Tutorial |
Sub Category: | PHP Extract Tutorial |
Uploaded by: | Admin |
Views: | 85 |
Reffered: https://www.php.net/manual/en/function.get-meta-tags.php