Jump to content
xisto Community
Sign in to follow this  
jlhaslip

Finding Data In Meta Tags using php to search Meta Tags for data

Recommended Posts

In the Head portion of an Html file, there are usually several Meta Tags that contain data about various things, like the tag for keywords, an Author's name or maybe a description field.

Here are two example Meta tags:

 

<meta name="Keywords" content="keyword1, keyword2" />
 <meta name="Description" content=" A Description of the file's content is here" />

 

So, what I have a question about concerns checking a file to see what information is included in these tags and using that information as variables or content in the output of the page. For example, if I wanted to find the information included in the content="..." field in either of these two meta tags, what php variable would I check or how would I find it from inside the php page?

Then I wish to output it using an echo or print command. Is this possible?

 

Okay.... Never mind, I found the answer.

How about I just use "get_meta_tags ()" and the array elements found in that?

 

R T F M

Share this post


Link to post
Share on other sites
Guest
This topic is now closed to further replies.
Sign in to follow this  

×
×
  • Create New...

Important Information

Terms of Use | Privacy Policy | Guidelines | We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.