I am trying to get information about an IP address from api.hostip.info but the following code returns the current XML version;
$context = stream_context_create(array('http' => array('header' => 'Accept: application/xml')));
$url = 'http://api.hostip.info/?ip=12.215.42.19';
$xml = file_get_contents($url, false, $context);
$xml = simplexml_load_string($xml);
var_dump($xml);
How can I return the data from the URL?