how do I grab title,description and keywords...without get_meta_tags
开发者_C百科function??
You can also try this HTML DOM parser: http://simplehtmldom.sourceforge.net/
An option:
<?php
$database = 'meta_tags.txt';
$meta_db = fopen($database, 'r');
$page = $_SERVER['SCRIPT_NAME'];
$page = substr($page, 1);
while($data = fgetcsv($meta_db, 9000, '|'))
{
if($data[0] == $page)
{
$title = $data[1];
$meta_keywords = $data[2];
$meta_description = $data[3];
}
}
?>
Taken from:
http://www.hawkee.com/snippet/3640/
精彩评论