Udp or http
/*
ini_set('display_errors', 1);
ini_set('display_startup_errors', 1);
error_reporting(E_ALL);
*/// die($seeders);
on 2021-05-26 18:13:11
Uncaught Exception: 2021-05-26 21:00:10 - Invalid integer format or integer overflow: error code in file /home/test-page/app/libraries/Bencode.php on line 103
Call Stack
[0] File: /home/test-page/app/libraries/Bencode.php Line: 70
Function: Bencode::checkInteger
Call parameters
Param[0]: Passed value: 'error code'
[1] File: /home/test-page/app/helpers/torrent_helper.php Line: 53
Function: Bencode::decode
Call parameters
Param[0]: Passed value: 'error code: 1020'
[2] File: /home/test-page/app/controllers/Scrape.php Line: 71
Function: torrent_scrape_url
Call parameters
Param[0]: Passed value: 'https://tracker.lilithraws.cf:443/scrape'
Param[1]: Passed value: 'a557bd4a869f931f0c1df359a9ddaadc05db3479'
[3] File: /home/test-page/app/libraries/Core.php Line: 51
Function: Scrape->index
Call parameters
[4] File: /home/test-page/public_html/index.php Line: 4
Function: Core->__construct
Call parameters
class Scrape extends Controller
{
public function __construct()
{
Auth::user();
$this->torrentModel = $this->model('Torrent');
$this->valid = new Validation();
$this->logsModel = $this->model('Logs');
}
public function index()
{
$id = $_GET['id'];
$resu = DB::run("SELECT id, info_hash FROM torrents WHERE external = 'yes' AND id = $id");
while ($rowu = $resu->fetch(PDO::FETCH_ASSOC)) {
//parse torrent file
$torrent_dir = TORRENTDIR;
//$TorrentInfo = array();
$Tor = new Parse();
//$TorrentInfo = Parse::torr("$torrent_dir/$rowu[id].torrent");
$TorrentInfo = $Tor->torr("$torrent_dir/$rowu[id].torrent");
$ann = $TorrentInfo[0];
$annlist = array();
if ($TorrentInfo[6]) {
foreach ($TorrentInfo[6] as $ann) {
$annlist[] = $ann[0];
}
} else {
$annlist = array($ann);
}
$seeders = $leechers = $downloaded = null;
foreach ($annlist as $ann) {
$tracker = explode("/", $ann);
$path = array_pop($tracker);
$oldpath = $path;
$path = str_replace("announce", "scrape", $path);
$tracker = implode("/", $tracker) . "/" . $path;
if ($oldpath == $path) {
continue;
}
// Is It udp OR http
if (preg_match('/udp:\/\//', $tracker)) {
$udp = true;
try
{
$timeout = 5;
$udp = new Udptscraper(); //$timeout
$stats = $udp->scrape($tracker, $rowu["info_hash"]);
foreach ($stats as $idu => $scrape) {
//print_r($scrape); echo '<br>above upd'; exit();
$seeders += intval(strip_tags($scrape['seeders']));
$leechers += intval(strip_tags($scrape['leechers']));
$downloaded += intval(strip_tags($scrape['completed']));
}
DB::run("
UPDATE `announce`
SET `online` = ?, `seeders` = ?, `leechers` = ?, `times_completed` = ?
WHERE `url` = ?
AND `torrent` = ?",
['yes', $stats['seeds'], $stats['peers'], $stats['downloaded'], $ann, $rowu['id']]);
DB::run("
UPDATE torrents
SET leechers = ?, seeders = ?, times_completed = ?, last_action = ?, visible = ?
WHERE id = ?",
[$leechers, $seeders, $downloaded, TimeDate::get_date_time(), 'yes', $rowu['id']]);
Redirect::autolink(URLROOT . "/torrents/read?id=$id", Lang::T("The Tracker is Udp take note"));
} catch (ScraperException $e) {
$e->isConnectionError();
}
} else {
$http = true;
try {
$timeout = 5;
$http = new Httpscraper($timeout);
$stats = $http->scrape($tracker, $rowu["info_hash"]);
foreach ($stats as $idu => $scrape) {
// print_r($scrape); echo '<br>above http'; exit();
$seeders += intval(strip_tags($scrape['seeders']));
$leechers += intval(strip_tags($scrape['leechers']));
$downloaded += intval(strip_tags($scrape['completed']));
}
DB::run("
UPDATE `announce`
SET `online` = ?, `seeders` = ?, `leechers` = ?, `times_completed` = ?
WHERE `url` = ?
AND `torrent` = ?",
['yes', $stats['seeds'], $stats['peers'], $stats['downloaded'], $ann, $rowu['id']]);
DB::run("
UPDATE torrents
SET leechers = ?, seeders = ?, times_completed = ?, last_action = ?, visible = ?
WHERE id = ?",
[$leechers, $seeders, $downloaded, TimeDate::get_date_time(), 'yes', $rowu['id']]);
Redirect::autolink(URLROOT . "/torrents/read?id=$id", Lang::T("The Tracker is http take note"));
} catch (ScraperException $exc) {
$exc->isConnectionError();
}
}
}
}
}
}
on 2021-05-27 12:30:43
on 2021-05-27 15:47:56
Uncaught Exception: 2021-05-27 18:38:02 - syntax error, unexpected ';', expecting ')' in file /home/test-page/app/controllers/Scrape.php on line 20
Call Stack
[0] File: /home/test-page/public_html/index.php Line: 4
Function: Core->__construct
Call parameters
No users online
Torrents
Members
Online