Login
Username: Password:
Remember me

[Sign Up] / [Recover Password]

Theme / Language

Popular
New Torrents
new name
Size: 18.40 MB
Most active
new name
S: 74 L: 3
New Posters
Observations for M-Jay
Controls ·  Search New posts · Mark unread

You are in: Forum / Forum / M-BiTsy / M-BiTsy Support

2021-05-26 16:38:45
Udp or http
2021-05-26 18:12:28
you can try add these 2 files app/controller/Scrape.php & app/libraries/Httpscraper.php
now test

after test check exception log file
check errorlog or server log
in scrape.php there is two piece of code to help identify errors

remove /*  and */
/*
ini_set('display_errors', 1);
ini_set('display_startup_errors', 1);
error_reporting(E_ALL);
*/


line 126 remove //
// die($seeders);

new scraper.zip
File missing
Last edited by M-jay warn on 2021-05-26 18:13:11
2021-05-26 21:02:11
Hi M-Jay and thanks,
this is SQL-Error logg:

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



www.exyusubs.com
TorrentTrader V3.8.3 (SE)
OS: AlmaLinux 9.9 (BC)
Apache version: 2.4.71
PHP version: 8.5.13 (PHP-FPM)
MySQL version: 10.11.18-MariaDB
2021-05-27 12:09:59
do you have a copy of that torrent i can test please, i have attached one that i have working on xamp if you can test that

app/controller/Scrape


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();
                   }
               }
           }

       }
   }
}


testtorrent.zip
File missing
Last edited by M-jay warn on 2021-05-27 12:30:43
2021-05-27 14:56:37
[img]https://imgur.com/2lcmXDH[/img]

trying to show a picture here as done in earlier replies...but unable. No idea why yet.

Copied the new code, will check and test again tomorrow.
If It Ain't Dutch, It Ain't Much!!
Last edited by M-jay warn on 2021-05-27 15:47:56
2021-05-27 18:41:29
Hi M-Jay, hve changed Scrape.php to the new one and this error comming up now



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






www.exyusubs.com
TorrentTrader V3.8.3 (SE)
OS: AlmaLinux 9.9 (BC)
Apache version: 2.4.71
PHP version: 8.5.13 (PHP-FPM)
MySQL version: 10.11.18-MariaDB
2021-05-28 18:32:05
Like your header layout for the default theme, but missing the search field.

The search field in our current theme implements the "dead"  etc torrents...possible?
The search field is also a sort of wild search, well I have tried to explain before....

Other then this, default theme header is NICE

For my u2torrent theme, I have made the vertical spacing between the block variable using the CSS code.
Would be nice if this became a default option in the code.

For the header menu, you may remove some of the formatting ;-) Just to make all fonts same size and type.
If It Ain't Dutch, It Ain't Much!!
Last edited by Propaganda on 2021-05-28 18:35:00
Users online

No users online

Search



Statistics

    Torrents

  • Tracking: 3
  • Todays torrents: 0
  • Seeders: 0
  • Leechers: 0
  • Peers: 0
  • Downloaded: 89.96 GB
  • Uploaded: 9.86 GB

  • Members

  • We have: 838
  • New today: 0
  • Guest today: 9

  • Online

  • Total online: 1
  • Members: 0
  • Guests online: 1
  • Comments: 3
  • Messages: 1,728