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()
{
global $CURRENTPATH, $TABLE_PREFIX, $btit_settings;
if($btit_settings["fmhack_multi_tracker_scrape"] == "enabled")
require_once $CURRENTPATH.'/getscrape_multiscrape.php';
else
require_once $CURRENTPATH.'/getscrape.php';
global $update_interval;
if($update_interval == 0)
return;
$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];
if(!$row)
{
do_sqlquery("INSERT INTO {$TABLE_PREFIX}tasks (task, last_time) VALUES ('update',$now)");
return;
}
$ts = $row['lt'];
if($ts + $update_interval > $now)
return;
do_sqlquery("UPDATE {$TABLE_PREFIX}tasks SET last_time=$now WHERE task='update' AND last_time = $ts");
if(!mysqli_affected_rows($GLOBALS['conn']))
return;
$res = get_result("SELECT announce_url FROM {$TABLE_PREFIX}files WHERE external='yes' ORDER BY lastupdate ASC LIMIT 1", true, $btit_settings['cache_duration']);
if(!$res || count($res) == 0)
return;
// 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']);
if(!$resurl || count($resurl) == 0)
return $combinedinfohash = array();
foreach($resurl as $id => $rhash)
$combinedinfohash[] = $rhash['info_hash'];
//scrape($row["announce_url"],$row["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
Bump: nobody helped me from here :(
i was looking for auto scrape system and finally i got one php library to scrape (the one in xbtit was not that great.) so i modify everything to make it work with xbtit and made it auto scrape every 4 min to update peers (cronjob it too). now no need to run function from browser to update torrents now, server itself will do it! and i don't know whether it is heavy on server or not.
Bump: nobody helped me from here :(
i was looking for auto scrape system and finally i got one php library to scrape (the one in xbtit was not that great.) so i modify everything to make it work with xbtit and made it auto scrape every 4 min to update peers (cronjob it too). now no need to run function from browser to update torrents now, server itself will do it! and i don't know whether it is heavy on server or not.
Bump: nobody helped me from here :(
i was looking for auto scrape system and finally i got one php library to scrape (the one in xbtit was not that great.) so i modify everything to make it work with xbtit and made it auto scrape every 4 min to update peers (cronjob it too). now no need to run function from browser to update torrents now, server itself will do it! and i don't know whether it is heavy on server or not.
Bump: nobody helped me from here :(
i was looking for auto scrape system and finally i got one php library to scrape (the one in xbtit was not that great.) so i modify everything to make it work with xbtit and made it auto scrape every 4 min to update peers (cronjob it too). now no need to run function from browser to update torrents now, server itself will do it! and i don't know whether it is heavy on server or not.
Bump: nobody helped me from here :(
i was looking for auto scrape system and finally i got one php library to scrape (the one in xbtit was not that great.) so i modify everything to make it work with xbtit and made it auto scrape every 4 min to update peers (cronjob it too). now no need to run function from browser to update torrents now, server itself will do it! and i don't know whether it is heavy on server or not.
Bump: nobody helped me from here :(
i was looking for auto scrape system and finally i got one php library to scrape (the one in xbtit was not that great.) so i modify everything to make it work with xbtit and made it auto scrape every 4 min to update peers (cronjob it too). now no need to run function from browser to update torrents now, server itself will do it! and i don't know whether it is heavy on server or not.