Story Details

How To Grab The Meta Tags Data From A Local File Or A URL Using PHP

Posted By pubpixel 247 days ago on Tutorials

http://www.pubpixel.com - Now in-order to grab the tags content attributes values from a web page or file you will need to use PHP's get_meta_tags() function which was introduced to us in PHP 4. The get_meta_tags() function extracts all the meta tags content attributes values from a file and returns it as an array. The get_meta_tags() function opens the filename parameter and parses it line by line for meta tags in the file or URL until it reaches the head end tag, in-order to stop parsing. Only meta tags with the name attribute will be parsed. The get_meta_tags() function returns an array with all the parsed meta tags

Submit a Comment

Log in to comment or register here