i have this script which is workign just fine in server but in local wamp it is giving error
i have fopen is on
Warning: get_headers(): This function may only be used against URLs in C:\wamp\www\url\test5.php on line 8
<?php
$websitelink= 'http://www.brobible.com/girls/article/miley-cyrus-21st-birthday-party';
$html = file_get_contents($websitelink);
$doc = new DOMDocument();
@$doc->loadHTML($html);
$tags = $doc->getElementsByTagName('img');
foreach ($tags as $tag) {
$data = get_headers($tag->getAttribute('src'),1);
$op7=''.$tag->getAttribute('src').'';
echo $op7;
}
?>
this code just works fine in server but not in local wamp server