I'm having trouble getting PHP to connect to my webpages so I can do link checking. I need to get the title because some pages might work even though they're an internal search result that doesn't return any results (I want to count these as broken links) in which case the title would contain "No items found...".
Here is the code I'm using:
$html = strtolower(implode('', file_get_contents("http://www.yahoo.com")));
echo $html;
I also tried:
$html = strtolower(implode('', file("http://www.yahoo.com")));
echo $html;
And:
$html = strtolower(implode('', fopen("http://www.yahoo.com",'r')));
echo $html;
None of these work. In php.ini allow_url_fopen is set to "On" (I also tried setting it to "1" but that didnt work either). I'm at a loss on this one, any ideas would be greatly appreciated.