I was unaware of proxy requirements on some hosts. That could very well be the problem.
I’ve used cURL in a few scripts but I have never used CURLOPT_HEADER and I have always used CURLOPT_CONNECTTIMEOUT
If you try this does it work?
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL,
'http://dd.weatheroffice.ec.gc.ca/citypage_weather/xml/NS/s0000450_e.xml');
curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 30);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$xmlContents = curl_exec($ch);
print("XML contents = ");
print_r($xmlContents);
print("\
");
curl_close($ch);