Php get_meta_tags Function
Get_meta_tags
(PHP 4 and PHP 5)
Get_meta_tags-extract all relay TAG content attributes from a file and return an array
Description
Array get_meta_tags (string $ file name [, Boolean $ use_include_path = false])
Open the file and parse its line
Marked file. Analysis site "/Header ".
Parameters
File Name
As a string. This can be a local file or URL.
For example, #1 get_meta_tags () Parsing
"/Header" "! -Resolution stops here-"(note the end of the line-the usage function of PHP parses local investment, so the Mac file will not work in Unix ).
Use_include_path
Setting use_include_path to TRUE causes PHP to attempt to open the file by following the include_path command along the road. This is used for local files, not URLs.
Return Value
Returns all resolved meta tags of an array.
The Value Name attribute becomes the value of the property of the key value content, which is returned to the array, so that you can easily use standard array functions to traverse or access a single value. The value property name of a special character replaces '_', and the rest will be converted to lower case. If two relay tags have the same name, only the last one is returned.
Modify
Version description
The HTML attribute unquoted supported by 4.0.5 is added.
Instance
For example, #2 What get_meta_tags () returns
// 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']; // name
Echo $ tags ['keyword']; // php documentation
Echo $ tags ['description']; // a php manual
Echo $ tags ['geo _ position']; // 49.33;-86.59
?>