I'm writing some SQL code for a website I'm constructing and I've come across this error recently:
Parse error: syntax error, unexpected end of file in /home/xxxxxxxx/public_html/geo.php on line 281
//$xmlstring = file_get_contents
( "http://www.infosniper.net/xml.php?ip_address=".$_SERVER["REMOTE_ADDR"] );
$xmlstring = file_get_contents ( "http://www.infosniper.net/xml.php?k=PurChAseAkEY&ip=".$ip_address );
$xml = new SimpleXMLElement ( $xmlstring );
echo $xml->result[0]->ipaddress;
echo $xml->result[0]->hostname;
echo $xml->result[0]->provider;
echo $xml->result[0]->country;
echo $xml->result[0]->countrycode;
echo $xml->result[0]->countryflag;
echo $xml->result[0]->state;
echo $xml->result[0]->city;
echo $xml->result[0]->areacode;
echo $xml->result[0]->postalcode;
echo $xml->result[0]->dmacode;
echo $xml->result[0]->latitude;
echo $xml->result[0]->longitude;
?>
I'm a bit confused because at the end of line 281 is an </html>
tag.
Does anybody have any idea why I would be getting this error with the above snippet?