...

View Full Version : Please assist - need small script converted from fopen to cURL



Errica
08-23-2007, 03:54 PM
My host just switched off fopen and my php skills are lousy at best. :(

PLEASE help!


$file = WEATHER_FILE . '.' . $zip . '.xml';
if(!file_exists($file) || filemtime($file) < time() - 3600) {
$this->data = @file_get_contents('http://xml.mydomain.com/rss?p=' . $zip . '&u=' . $units['temp']);
$fp = @fopen($file, 'w');
@fwrite($fp, $this->data);
@fclose($fd);
}
else $this->data = @file_get_contents($file);
if(strlen($this->data) <= 0) return;



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum