I am using the Create a Visitor Map tutorial and I am getting this error when running:
Warning: DOMDocument::load() [domdocument.load]: URL file-access is disabled in the server configuration in /www/vndv.com/a/p/n/apnews/htdocs/visitormap.php on line 13
Line 13 marked with ==>
<?php
function IPtoCoords($ip)
{
$dom = new DOMDocument();
$ipcheck = ip2long($ip);
if($ipcheck == -1 || $ipcheck === false)
trigger_error('Invalid IP, what are you doing? :|', E_USER_ERROR);
else
$uri = 'http://api.hostip.info/?ip=' . $ip;
==> $dom->load($uri);
$location = (strpos($dom->getElementsByTagName('name')->item(1)->nodeValue, 'Unknown') === false)
? $dom->getElementsByTagName('name')->item(1)->nodeValue
: $dom->getElementsByTagName('countryAbbrev')->item(0)->nodeValue;