well i am trying to get meta tags from a given URL.. i came up with this code ..
<?php
$URL = 'http://www.yahoo.com';
$meta_tags = get_meta_tags($URL) or die("Could not fetch meta tags for $URL");
print_r($meta_tags);
?>
but this code always fails .. why ? any better idea?
Meta tag grabber
Moderator: General Moderators
tryand post the output, esp. error/warning messages.
Code: Select all
<?php
error_reporting(E_ALL);
ini_set('display_errors', true);
echo 'allow_url_fopen: ', ini_get('allow_url_fopen') ? 'on':'off', "<br />\n";
$URL = 'http://www.yahoo.com';
$meta_tags = get_meta_tags($URL) or die("Could not fetch meta tags for $URL");
print_r($meta_tags);
?>