function _garbage_collection()
{
srand((double) microtime() * 1000000);
- if (rand(1, 100) <= $this->gc_probability) {
+ if (mt_rand(1, 100) <= $this->gc_probability) {
$dir = dir($this->_cache_dir);
while($file=$dir->read()) {
if (is_file($dir->path.$file) && substr($file, -6, 6) != ".cache" && substr($file, -4, 4) != ".log" && filemtime($dir->path.$file) <= time() - $this->_refresh ) {
fputs($fp, $request);
$reply = ""; $isContent = false; $dummy = "";
// Read reply
+ $i=0;
while ( !feof($fp) ) {
$read = trim(fgets($fp, 4096));
if (substr($read, 0, 5) == "<?xml" || $isContent) {