- Impact
- 0
Here's the part of the code that uses the fopen methodology:
PHP:
$file = SAMPLE_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['zap']);
$fp = @fopen($file, 'w');
@fwrite($fp, $this->data);
@fclose($fd);
}
else $this->data = @file_get_contents($file);
if(strlen($this->data) <= 0) return;






