Bravo List
Go Back   > Bravo List > Source Code > Archived Trackers > xBTiT
Old 10th July 2020, 10:26
JohnHasher's Avatar
JohnHasher JohnHasher is offline
Join Date: Apr 2020
Posts: 2
Question Auto Torrent Scrape
i need help to setup cronjob for auto update Peers of all torrents in database in xbtit fm .

in function.php
PHP Code:
function updatedata()
$btit_settings["fmhack_multi_tracker_scrape"] == "enabled")
$update_interval == 0)
$now time();
$res get_result("SELECT last_time as lt FROM {$TABLE_PREFIX}tasks WHERE task='update'"true$btit_settings['cache_duration']);
$row $res[0];
do_sqlquery("INSERT INTO {$TABLE_PREFIX}tasks (task, last_time) VALUES ('update',$now)");
$ts $row['lt'];
$ts $update_interval $now)
do_sqlquery("UPDATE {$TABLE_PREFIX}tasks SET last_time=$now WHERE task='update' AND last_time = $ts");
$res get_result("SELECT announce_url FROM {$TABLE_PREFIX}files WHERE external='yes' ORDER BY lastupdate ASC LIMIT 1"true$btit_settings['cache_duration']);
$res || count($res) == 0)
// get the url to scrape, take 5 torrent at a time (try to getting multiscrape)
$row $res[0];
$resurl get_result("SELECT info_hash FROM {$TABLE_PREFIX}files WHERE external='yes' AND announce_url='".$row['announce_url']."' ORDER BY lastupdate ASC LIMIT 5"true$btit_settings['cache_duration']);
$resurl || count($resurl) == 0)
$combinedinfohash = array();
$resurl as $id => $rhash)
$combinedinfohash[] = $rhash['info_hash'];
scrape($row[0], implode("','"$combinedinfohash));

This is the function to auto scrape torrent. but i need all torrents in database to scrape and need to setup like cronjob

please help me on this
Reply With Quote

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

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