I’m trying to retrieve information from an online XML file and it takes too long to get that information. It even get most of the times timeout error.
The strange part is that when i open the link directly on the browser is fast.
$xmlobj = simplexml_load_file('http://apple.accuweather.com/adcbin/apple/Apple_Weather_Data.asp?zipcode=EUR;PT;PO019;REGUA'); print header('Content-type: text/plain'); print_r($xmlobj);
That’s because they’re blocking depending what browser you’re using. Try this:
BTW. in the file you can see ‘Redistribution Prohibited’, so you might want to look for some royalty-free source of weather data.