Skip to content Skip to sidebar Skip to footer

How To Get Content Of The Meta Tag Of A Webpage

I am trying to read the content of a meta tag of a secure web page. But finding it difficult as the properties are not the general one like name, author etc. If their is any way po

Solution 1:

did you gone through these post in php.net ?

<metaname="author"content="name"><metaname="keywords"content="php documentation"><metaname="DESCRIPTION"content="a php manual"><metaname="geo.position"content="49.33;-86.59"></head><!-- parsing stops here -->

read these meta tags using php code writte below

<?php// Assuming the above tags are at www.example.com$tags = get_meta_tags('http://www.example.com/');

// Notice how the keys are all lowercase now, and// how . was replaced by _ in the key.echo$tags['author'];       // nameecho$tags['keywords'];     // php documentationecho$tags['description'];  // a php manualecho$tags['geo_position']; // 49.33;-86.59?>

these codes taken from http://php.net/manual/en/function.get-meta-tags.php

Post a Comment for "How To Get Content Of The Meta Tag Of A Webpage"