I have this xml resource and I want this to parsed in php.
http://example.gov
My php code :
<?php
$userinput='http://example.gov/MapClick.php?lat=41.98&lon=-87.9&FcstType=digitalDWML';
$xml = simplexml_load_file($userinput);
echo $xml;
?>
Error I am receiving :
Warning: simplexml_load_file(http://forecast.weather.gov/MapClick.php?lat=41.98&lon=-87.9&FcstType=digitalDWML): failed to open stream: HTTP request failed! HTTP/1.0 403 Forbidden in C:\xampp\htdocs\xmlParser.php on line 4
Warning: simplexml_load_file(): I/O warning : failed to load external entity "http://forecast.weather.gov/MapClick.php?lat=41.98&lon=-87.9&FcstType=digitalDWML" in C:\xampp\htdocs\xmlParser.php on line 4
And just to add, xml resource is on different server