Bravo List
Register
Go Back   > Bravo List > Source Code > Archived Trackers > Torrent Strike
Reply
Thread Tools
  #1  
Old 18th February 2009, 01:32
rytisp rytisp is offline
Senior Member
 
Join Date: Nov 2008
Lithuania
Posts: 15
Default TTL
hello, firstly I whant to ask when the torrentstrike.info will be opened ? :( And here is my question from the thread : On tstrike, how to remove TTL function ? ( Time to live ).
Reply With Quote
  #2  
Old 20th February 2009, 07:51
TheOracle TheOracle is offline
Member
 
Join Date: Apr 2008
Posts: 2
Default
in cleanup.php which you can find in the include folder

comment out or delete
Code:
	$dt = sqlesc(get_date_time(gmtime() - $torrent_ttl));
	$res = mysql_query("SELECT id, name FROM torrents WHERE added < $dt AND manual_delete = 'no' AND seeders=0 AND leechers=0");
	while ($arr = mysql_fetch_assoc($res))
	{
		@unlink("$torrent_dir/$arr[id].torrent");
  	mysql_query("DELETE FROM torrents WHERE id=$arr[id]");
		mysql_query("DELETE FROM peers WHERE torrent=$arr[id]");
		mysql_query("DELETE FROM comments WHERE torrent=$arr[id]");
		mysql_query("DELETE FROM files WHERE torrent=$arr[id]");
		write_log("Torrent $arr[id] ($arr[name]) was deleted by system, older than TTL");
	}
Reply With Quote
The Following User Says Thank You to TheOracle For This Useful Post:
rytisp (20th February 2009)
  #3  
Old 21st February 2009, 15:29
wMan wMan is offline
Banned
 
Join Date: Feb 2008
P2P
Posts: 1,433
Default
TimeToLive <-- i add this word so next time the search will find this topic

cleanup.php

delete



PHP Code:
// delete old torrents
    
$days 28;
    
$dt sqlesc(get_date_time(gmtime() - ($days 86400)));
    
$res mysql_query("SELECT id, name FROM torrents WHERE added < $dt");
    while (
$arr mysql_fetch_assoc($res))
    {
        @
unlink("$torrent_dir/$arr[id].torrent");
        
mysql_query("DELETE FROM torrents WHERE id=$arr[id]");
        
mysql_query("DELETE FROM peers WHERE torrent=$arr[id]");
        
mysql_query("DELETE FROM comments WHERE torrent=$arr[id]");
        
mysql_query("DELETE FROM files WHERE torrent=$arr[id]");
        
write_log("Torrent $arr[id] ($arr[name]) was deleted by system (older than $days days)");
    } 

bittorrent.php

delete



PHP Code:
<td class="colhead" align="center">TTL</td

and delete

PHP Code:
        $ttl = (28*24) - floor((gmtime() - sql_timestamp_to_unix_timestamp($row["added"])) / 3600);
        if (
$ttl == 1$ttl .= "<br>hour"; else $ttl .= "<br>hours";
        print(
"<td align=center>$ttl</td>\n"); 

userdetails.php

delete



PHP Code:
<td class=colhead align=center>TTL</td

and delete



PHP Code:
$ttl = (28*24) - floor((gmtime() - sql_timestamp_to_unix_timestamp($arr["added"])) / 3600);
    if (
$ttl == 1$ttl .= "<br>hour"; else $ttl .= "<br>hours"

and delete



PHP Code:
<td align=center>$ttl</td
Reply With Quote
The Following User Says Thank You to wMan For This Useful Post:
inebunit (8th January 2010)
Reply

Tags
ttl


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump



All times are GMT +2. The time now is 20:54. vBulletin skin by ForumMonkeys. Powered by vBulletin® Version 3.8.11 Beta 3
Copyright ©2000 - 2024, vBulletin Solutions Inc.