This script worked fine for a few weeks then stopped working for no reason.
1.<?php
2.ob_start();
3.include "weather xml website";
4.$data=ob_get_contents();
5.ob_clean();
6.
7.$xmlFile = 'filelocation\weatherData.xml';
8.
9.
10.$fh = fopen($xmlFile, 'w') or die("can not create or open $xmlFile");
11.
12.fwrite($fh, $data);
13.fclose($fh);
14.?>
I have used Google's and Msn's weather APIs and I can recieve the xml data fine by browsing, the file handler can create and edit the local xml. I had this script setup as a scheduled task to be run every 30 minutes.
Is there another method I should be using? caching? any help would be greatly appreciated