$expire && file_get_contents($cache) != ''){ $json = @file_get_contents($cache); print $json; } else { @file_put_contents($cache_c, '200'."\n".time()); $context = stream_context_create(array('http' => array('timeout' => 3))); touch($cache); $json = @file_get_contents('http://api.caramania.net/?type='. $type.'&ip='.$ip.'&port='.$port.'&cover_t='.$cover_t.'&mount='.$mount.'&ruid='.$ruid.'&json=1', 0, $context); if(!$json){ $json = file_get_contents($cache); } else { @file_put_contents($cache, $json); @file_put_contents($cache_c, '15'."\n".time()); } print $json; } ?>