ob_get_contents stopped working for some unknown reason

Neeseamynen

New Member
This script worked fine for a few weeks then stopped working for no reason.\[code\]1.<?php\[/code\]
\[code\]2.ob_start();\[/code\]
\[code\]3.include "weather xml website";\[/code\]
\[code\]4.$data=http://stackoverflow.com/questions/3763995/ob_get_contents();\[/code\]
\[code\]5.ob_clean();\[/code\]
\[code\]6.\[/code\]
\[code\]7.$xmlFile = 'filelocation\weatherData.xml';\[/code\]
\[code\]8.\[/code\]
\[code\]9.\[/code\]
\[code\]10.$fh = fopen($xmlFile, 'w') or die("can not create or open $xmlFile");\[/code\]
\[code\]11.\[/code\]
\[code\]12.fwrite($fh, $data);\[/code\]
\[code\]13.fclose($fh);\[/code\]
\[code\]14.?>\[/code\]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
 
Back
Top