My local server reads the RSS fine, but when I upload it I'm getting this error:
Warning: fopen(http://webservice.weatherzone.com.au/rss/wx.php?u=13145<=aploc&lc=6439&fc=1) [function.fopen]: failed to open stream: HTTP request failed! in /var/www/vhosts/---------------------- on line 105
Error reading RSS data.
I cannot post the URL to the site because I'm still working on it and its a security issue. And I'm not able to modify the php.ini file...
This is the code where it is called:
$xml_parser = xml_parser_create();
$rss_parser = new RSSParser();
xml_set_object($xml_parser,&$rss_parser);
xml_set_element_handler($xml_parser, "startElement", "endElement");
xml_set_character_data_handler($xml_parser, "characterData");
**$fp = fopen("http://webservice.weatherzone.com.au/rss/wx.php?u=13145<=aploc&lc=6439&fc=1","r")
or die("Error reading RSS data.");**
while ($data = fread($fp, 4096))
xml_parse($xml_parser, $data, feof($fp))
or die(sprintf("XML error: %s at line %d",
xml_error_string(xml_get_error_code($xml_parser)),
xml_get_current_line_number($xml_parser)));
fclose($fp);
xml_parser_free($xml_parser);