note 14419 added to function.get-meta-tags.php
| From: | Ben dot Davis at furman dot edu | Date: | Mon, 30 Jul 2001 19:29:45 +0000 |
| Subject: | note 14419 added to function.get-meta-tags.php | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-16073@lists.php.net to get a copy of this message | ||
I have found that for large searches, get_meta_tags is very slow. I created a large search engine
for a website that couldnt use a database and I first tried pulling out the meta tags.
I have found that it is actually much faster to use eregi to pull out the meta tags. This code
below pulls out the description:
if (eregi ("<meta name=\"description\" content=[^>]*", $contents,
$descresult))
{
$description = explode("<meta
name=\"description\" content=", $descresult[0]);
echo "<font face=\"Arial\"
size=2>$description[1]</font>";
}
http://www.php.net/manual/en/function.get-meta-tags.php