Horje
How to get meta Tag | PHP Extract Tutorial Code
How to get meta Tag

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 false on failure.


How to extract Keyword Description Author from Meta Tag a HTML Page using URL

Just follow Example.

index.php
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>';
?>

Output should be:

How to extract Keyword Description Author from Meta Tag a HTML Page using URL



Read Full::
PHP Extract Tutorial Code
Category:
PHP Tutorial Code
Sub Category:
PHP Extract Tutorial Code
Uploaded:
3 weeks ago
Uploaded by:
Admin
Views:
31

Related Articles
How to extract Domain Name from Full URL in PHP PHP Extract Tutorial Code
How to extract only name from domain in PHP PHP Extract Tutorial Code
How to extract All url from a single page by PHP PHP Extract Tutorial Code
How to get meta Tag PHP Extract Tutorial Code

Single Articles
How to extract Keyword Description Author from Meta Tag a HTML Page using URL

Share on: