How do I fetch the meta tags from a webpage using PHP?
So here is how this function works practically.
Let's say we wanted to get the information for the PHP Questions homepage, then all we do is the following:
<?php
$gettags = get_meta_tags('http://www.php-questions.com/');
foreach($gettags as $i => $v) echo "$i - $v \n\n";
//outputs: description - PHP Questions contains a range of common questions and answers related to various aspects of PHP...
//keywords - php,questions,answers,php faq
?>
Note that, if available, this will also return the 'author' and 'geo_position' information for a webpage.
Comment on this Question and Answer >>>
ASK A QUESTION
More strings PHP Questions
How can I remove spaces from around a string value?What is the usage of {} in strings?
How do I remove trailing whitespace from a string?
How do I escape a string with slashes?
My echo command works fine like this: echo " $row[studentName]; however when I try to center the data using div it fails... echo "$row[studentName];
