I have this URL witch in my web browser leads me to a XML feed.
The problem is i can't retrieve it's information using cURL or file_get_contents. The curious thing was that yesterday at my home i could retrieve it using this block of code:
if (($response_xml_data = file_get_contents($this->url_request))===false){
echo "Error fetching XML\n";
} else {
libxml_use_internal_errors(true);
$data = simplexml_load_string($response_xml_data);
if (!$data) {
echo "Error loading XML\n";
foreach(libxml_get_errors() as $error) {
echo "\t", $error->message;
}
} else {
print_r($data);
}
}*/
Today the same block of code in the same computer enviromment but in a different network throws me this error message:
Message: file_get_contents(http://mandeo.meteogalicia.es/thredds/ncss/grid/modelos/WRF_HIST/d03/2016/04/wrf_arw_det_history_d03_20160413_0000.nc4?var=temp%2Cprec%2Cu%2Cv%2Cdir%2Cvisibility&point=true&latitude=41.15&longitude=-8.6166667&accept=xml): failed to open stream: php_network_getaddresses: getaddrinfo failed: Name or service not known
Anyone has any ideas to workaround this? Thank you!