Re: Collecting Meta Tags and Traping Errors
| From: | Philip J. Newman | Date: | Tue, 05 Feb 2002 06:20:34 +0000 |
| Subject: | Re: Collecting Meta Tags and Traping Errors | ||
| References: | 1 2 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-83538@lists.php.net to get a copy of this message | ||
Warning: get_meta_tags("http://www.philipsdomain.com/") - No error in
d:\website\myphp\test01.php on line 5
even with the changes i get the error
<?php
$get_url = "http://www.philipsdomain.com/";
$metatags = get_meta_tags($get_url,1);
echo $metatags['keywords'];
echo $metatags[description];
?>
----- Original Message -----
From: "Analysis and Solutions" <danielc@analysisandsolutions.com>
To: "PHP List" <php-general@lists.php.net>
Sent: Tuesday, February 05, 2002 7:03 PM
Subject: Re: [PHP] Collecting Meta Tags and Traping Errors
> Hi Philip:
>
> Several problems...
>
> > <?php
> > $get_url = "http://www.philipsdomain.com";
>
> Put a "/" on the end there. Without it, you're not really hitting a page,
> but rather a redirect to a page.
>
>
> > $metatags= get_meta_tags($get_url,1);
> >
> > echo "$metatags[Keywords]";
>
> The manual indicates that the key names are converted to lower case, so
you
> need to use "keywords" rather than "Keywords." Also, since they key name
is
> text, it's best to quote the key name. So, rewrite the line like this:
>
> echo $metatags['keywords'];
>
>
> > echo "<br>";
> > echo "$metatags[Description]";
>
> Same principles apply here.
>
> Enjoy,
>
> --Dan
>
> --
> PHP scripts that make your job easier
> http://www.analysisandsolutions.com/code/
> SQL Solution | Layout Solution | Form Solution
> T H E A N A L Y S I S A N D S O L U T I O N S C O M P A N Y
> 4015 7 Ave, Brooklyn NY 11232 v: 718-854-0335 f: 718-854-0409
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>
>