Exemple #1
0
function printdir($a, $n)
{
    echo "<hr><p>" . realpath($n) . "\n";
    foreach ($a as $k => $v) {
        echo "  [{$k}] => stat({$v})\n  (" . getstat($v) . "\n  )\n";
    }
}
Exemple #2
0
				{ // 1 day of inactivity
				unlink($file);
				if(file_exists("multiseed/$file"))
				{
				unlink("multiseed/$file");
				}
				// keep this hidden
				// 1 days inactive if
			}
			else
			{
			// getstat is not run so that the filemtime is not changed
				$o .= '20:' . pack("H*", $file) . 'd8:completei' . (int)0 . 'e10:incompletei' . (int)0 . 'ee';
			}
			}else{
                                $o .= getstat($file);
                               }
                        }
                }
                closedir($handle);
                $o .= 'ee';
                $handle1 = fopen('scrape', "w");
                flock($handle1, LOCK_EX);
                fwrite($handle1, $o);
                flock($handle1, LOCK_UN);
                fclose($handle1);
                die($o);
        }
}
?>
Exemple #3
0
<TR BGCOLOR="#EAE7E2">
<TH WIDTH="80%">Hash</TH>
<TH WIDTH="10%">UL</TH>
<TH WIDTH="10%">DL</TH>
</TR><?
$handle = opendir('.');
while (false !== ($file = readdir($handle)))
{
        if(strlen($file) == 40)
        {
        	if((time() - filemtime($file)) >= 86400 && filesize($file) == 0){ // 1.25 days of inactivity
                        unlink($file);
                if(file_exists("multiseed/$file")){
                        unlink("multiseed/$file");
                }
                // keep this hidden
                // should not reactivate dying torrents
                }else{
                echo getstat($file);
                }
        }
}
closedir($handle);?>
</TABLE>
<?
}
?>
<TABLE ALIGN="CENTER" CELLSPACING="10" CELLPADDING="0" BORDER="0"><TR><TD ALIGN="CENTER">Anatomic P2P Powered By FBT2 - Flippy's BitTorrent Tracker v2 (GPL)<BR>http://www.torrentz.com/fbt.html</TD></TR></TABLE>
</BODY>
</HTML>
Exemple #4
0
while($row = mysql_fetch_array($result))
{
    // there should be no other reason to have a 40 byte table name
    if($row["Rows"] == "0") // returns a string??
    {
        if(mysql_date_parser($row["Update_time"]) <= (time() - 86400))
        {
            mysql_query('DROP TABLE ' . $row["Name"]);
            $query = sprintf("DELETE FROM `multiseed` WHERE info_hash = '%s' ", mysql_real_escape_string(pack('H*' ,$row["Name"])));
            @mysql_query($query);
        }
        else
        {
            echo getstat($row["Name"]);
        }
    }
    else
    {
        echo getstat($row["Name"]);
    }
}
mysql_close();
?>
</TABLE>
<?
}
?>
<TABLE ALIGN="CENTER" CELLSPACING="10" CELLPADDING="0" BORDER="0"><TR><TD ALIGN="CENTER">Anatomic P2P Tracker 0.1 RC1 based on FBT2 - Flippy's BitTorrent Tracker v2 (GPL)<BR>http://www.torrentz.com/fbt.html</TD></TR></TABLE>
</BODY>
</HTML>
Exemple #5
0
    }
    mysql_close();
    die('ee');
}
if ($wholescrape) {
    $o = 'd5:filesd';
    // SHOW TABLES LIKE does not seem to work on some versions of MYSQL
    $db = mysql_connect($dbhost, $dbuname, $dbpasswd);
    mysql_select_db($dbname, $db);
    $result = mysql_query("SHOW TABLE STATUS LIKE '________________________________________'");
    while ($row = mysql_fetch_array($result)) {
        // there should be no other reason to have a 40 byte table name
        if ($row["Rows"] == "0") {
            if (mysql_date_parser($row["Update_time"]) <= time() - 86400) {
                mysql_query('DROP TABLE IF EXISTS ' . $row["Name"]);
                $query = sprintf("DELETE FROM `multiseed` WHERE info_hash = '%s' ", mysql_real_escape_string(pack('H*', $row["Name"])));
                @mysql_query($query);
                // it might not be a multiseed torrent
            } else {
                $o .= getstat($row["Name"]);
            }
        } else {
            $o .= getstat($row["Name"]);
        }
    }
    mysql_close();
    $o .= 'ee';
    die($o);
} else {
    er('Please specify an info_hash.');
}