Bravo List
Register
Go Back   > Bravo List > Source Code > Archived Trackers > Free Torrent Source
Reply
  #1  
Old 13th January 2010, 12:28
xxx2008 xxx2008 is offline
Senior Member
 
Join Date: Jul 2009
P2P
Posts: 33
Default Torrent ... was deleted by system (older than 128 days)
source and remove torrents that are not dead and are still active

How do I change the number of days???

thx
Reply With Quote
  #2  
Old 13th January 2010, 17:26
elvira's Avatar
elvira elvira is offline
Senior Member
 
Join Date: Jan 2008
Slovenia
Posts: 172
Default
Try this one

Code:
////////auto-delete old torrents////////     
$days = 5;
$dt = sqlesc(get_date_time(gmtime() - ($days * 86400)));
$days_la = 7;
$dt_la = sqlesc(get_date_time(gmtime() - ($days_la * 86400)));
$res = sql_query("SELECT id, name FROM torrents WHERE added < $dt AND seeders=0 AND leechers=0 AND last_action < $dt_la ");
while ($arr = mysql_fetch_assoc($res))
{
@unlink("$torrent_dir/$arr[id].torrent");
sql_query("DELETE FROM torrents WHERE id=$arr[id]");
sql_query("DELETE FROM peers WHERE torrent=$arr[id]");
sql_query("DELETE FROM snatched WHERE torrent=$arr[id]");
sql_query("UPDATE avps SET value_d='0000-00-00 00:00:00', value_s='' WHERE arg='bestfilmofweek' AND value_s=".$arr["id"]);
sql_query("DELETE FROM comments WHERE torrent=$arr[id]");
sql_query("DELETE FROM files WHERE torrent=$arr[id]");
write_log("Torrent $arr[id] ($arr[name]) was deleted by system (older than $days days and no seeders or leechers in 7 day's)");
$message = "Torrent $arr[id] ($arr[name]) was deleted by system (older than $days days and no seeders or leechers in 7 day's)";
autoshout($message);
}
Reply With Quote
  #3  
Old 14th January 2010, 12:32
xxx2008 xxx2008 is offline
Senior Member
 
Join Date: Jul 2009
P2P
Posts: 33
Default
what file find it?
use FTS1.1

thx
Reply With Quote
  #4  
Old 14th January 2010, 20:19
Edgein's Avatar
Edgein Edgein is offline
Senior Member
 
Join Date: Sep 2008
Netherlands
Posts: 154
Smile
Here you can find it

Go to /include/libs/cron/cron_class.php

Find there

PHP Code:
            // delete old torrents
    
$days 128 ;
    
$dt sqlescget_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 snatched WHERE torrentid =$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)" ) ;
    } 
grtzz edgein
Reply With Quote
  #5  
Old 15th January 2010, 09:10
xxx2008 xxx2008 is offline
Senior Member
 
Join Date: Jul 2009
P2P
Posts: 33
Default
thx m8

Quote:
Originally Posted by elvira View Post
Try this one

no work, give an error docleanup.php
Reply With Quote
  #6  
Old 15th January 2010, 21:20
elvira's Avatar
elvira elvira is offline
Senior Member
 
Join Date: Jan 2008
Slovenia
Posts: 172
Default
Witch error you have
Reply With Quote
  #7  
Old 20th January 2010, 11:19
xxx2008 xxx2008 is offline
Senior Member
 
Join Date: Jul 2009
P2P
Posts: 33
Default
Code:
Warning: fopen(/var/www/datashare.com/admin/2010-01-20.log) [function.fopen]: failed to open stream: Permission denied in /var/www/datashare.ro/include/class_logger.php on line 111
[0] in function fopen in /var/www/datashare.com/include/class_logger.php on line 111
[1] in function Logger->Save in /var/www/datashare.com/include/class_sql.php on line 303
[2] in function SQL->err in /var/www/datashare.com/include/class_sql.php on line 103
[3] in function SQL->query in /var/www/datashare.com/include/functions.php on line 46
[4] in function sql_query in /var/www/datashare.com/include/libs/cron/cron_class.php on line 164
[5] in function cron::torrentscron in /var/www/datashare.com/include/cron-main.php on line 46
[6] in function docleanup in /var/www/datashare.com/admin/docleanup.php on line 10

Warning: fopen(/var/www/datashare.com/admin/2010-01-20.log) [function.fopen]: failed to open stream: Permission denied in /var/www/datashare.com/include/class_logger.php on line 111
[0] in function fopen in /var/www/datashare.com/include/class_logger.php on line 111
[1] in function Logger->Save
Reply With Quote
  #8  
Old 20th January 2010, 17:36
elvira's Avatar
elvira elvira is offline
Senior Member
 
Join Date: Jan 2008
Slovenia
Posts: 172
Default
you must add in yours include/class_logger.php to the permission on 777
Reply With Quote
  #9  
Old 20th January 2010, 22:37
xxx2008 xxx2008 is offline
Senior Member
 
Join Date: Jul 2009
P2P
Posts: 33
Default
I put 777 but still not working, I changed the 5 to 160 and so wants to go without error docleanup.php
Reply With Quote
  #10  
Old 16th March 2010, 15:01
westerfield westerfield is offline
Member
 
Join Date: Sep 2009
United States
Posts: 4
Default fix
Go to /include/libs/cron/cron_class.php


look for this in / delete old torrents
$days = 128 ;<change this to what ever

that it
Reply With Quote
Reply

Tags
128 , days , deleted , older , system , torrent

Thread Tools

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

Similar Threads
Thread Thread Starter Forum Replies Last Post
MyTSP [ON HOLD] Tony Torrent Strike 30 6th October 2015 19:20
Betting system LuddeSnutte TBDev 18 19th June 2014 11:05
Starter themes collection daffy Mods & Themes 0 25th May 2010 00:26
TS Torrent Moderation System Omen Template Shares 1 8th July 2009 23:23
IP value ban system Muikku Template Shares 2 2nd July 2009 15:03



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