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
User Posts

Go to Profile

Announce - BIGINT Errors — 2020-07-15 09:48:52 in v3 Support
The int(50) is 50 characters of padding for programs like phpmyadmin so the correct thing to do would be to use unsigned big int, the range starts from zero up to the number described above.


you can do something like if seeders over 0 then subtract 1 else use 0

I
Announce - BIGINT Errors — 2020-07-08 22:11:22 in v3 Support
[url='https://dev.mysql.com/doc/refman/8.0/en/integer-types.html']BIGINT[(M)] [UNSIGNED] [ZEROFILL][/url]

A large integer. The signed range is-9223372036854775808 to9223372036854775807. The unsigned range is 0to 18446744073709551615.

just check the fields are above 0 for subtraction, because unsigned prevent anything Lower than 0
Announce - BIGINT Errors — 2020-07-06 22:13:21 in v3 Support
The issue is the number can become negative, it should only subtract if numbers are both positive.
Session Mod [TTv3] — 2020-05-05 21:07:41 in v3 Mods Completed
Looking good
Session Mod [TTv3] — 2020-05-03 09:09:27 in v3 Mods Completed
When you define functionality for the session handler you don’t need to call the functions this is automatically done. The only thing required is to set SESSION vars.
MVC Update (PDO) — 2020-05-01 09:36:00 in M-BiTsy Support
You can store the ip and user agent and then implement a config option to ensure the ip and user agent the same but on dynamic ips this would log people out a lot and same for browser if that gets updated it would log them out.
MVC Update (PDO) — 2020-05-01 09:32:42 in M-BiTsy Support
Also the only piece of data actually required in a session would be the user ID.
MVC Update (PDO) — 2020-05-01 09:30:06 in M-BiTsy Support
Look into session set save handler that will allow you to implement a custom session handler. I think the session start should also be global and only time it needs clearing is in logoutcookie.
MVC Update (PDO) — 2020-04-25 07:34:05 in M-BiTsy Support
Ideally the logincookie needs to populate the session, and user login should check whether a session is active.
MVC Update (PDO) — 2020-04-19 11:59:24 in M-BiTsy Support
Do you have this setup on github? I think it would be good to change cookies to sessions but allow the user to have a remember me option
MVC Update (PDO) — 2020-04-19 11:23:56 in M-BiTsy Support
I had a look at some of this, after some observations I would recommend making all models require the database e.g __construct(Database $db) and set it to a property inside the given model, and then all the methods of a model can use that property to access the dB, the static calling should be avoided.
I almost finished the code for this project, to start with it will support a few methods:

GET /torrents
- Will allow people to iterate through the torrents held by the service, it will provide two pieces of info for each torrent held e.g: the name of the uploaded file and infohash.

GET /torrent/<infohash>
- Return the .torrent file for downloading if it exists.

GET /torrent/search/<query>
- Return name of uploaded .torrent file, infohash.

PUT /torrent
- Upload a .torrent

The service will have a api request limit, i am currently thinking of allowing 250 requests per hour.

There is a whole spectrum of things i had to think about whilst making this project whether to allow private torrents or not and i decided that these will be rejected.

Torrents could be trackerless and rely on DHT, these will be supported.

Once the project is finished i will post back here with the location, i need to come up with a name for the service. It will be possible for somebody to write a script in TT's backend to search / import .torrents
The optimal strategy would be to rewrite the script from scratch.

All the versions of megascrape do the same thing, load a .torrent obtain the trackers and try to obtain the stats for each.

Let's say we have 10,000 torrents and all those torrents have at least ten trackers then it's safe to say the number of requests that need to be made is basic maths of 10000 x 10 = 100,000

Those 100,000 requests on a small machine going to take some considerable time and in most cases the cron will start to overlap which means you end up having multiple processes running the same cron.

The best approach for v2.08+ would be:

1.) Obtain a distinct list of trackers from the announce table and have these cached for at least 1 hour.

2.) Iterate through the cached tracker list and call the database to find out the infohashes that use the specific tracker so you would end up getting an array like:

[TABLE]
[TR]
[TD][/TD]

[TD]Array[/TD]
[/TR]
[TR]
[TD][/TD]

[TD]([/TD]
[/TR]
[TR]
[TD][/TD]

[TD]    [udp://9.rarbg.to:2710/announce] => Array[/TD]
[/TR]
[TR]
[TD][/TD]

[TD]        ([/TD]
[/TR]
[TR]
[TD][/TD]

[TD]            [0] => 6503b9aacdc6a785d82c528eefb48e81168bdf85[/TD]
[/TR]
[TR]
[TD][/TD]

[TD]            [1] => 0e5e6e30a4ebabd2db230dccae867dad1307abe4[/TD]
[/TR]
[TR]
[TD][/TD]

[TD]            [2] => 6b87cfe72e81dfe4c22e39b7f6050d157a7a7523[/TD]
[/TR]
[TR]
[TD][/TD]

[TD]            [3] => 42bdef23779189520c51a2e2255b6963545c229f[/TD]
[/TR]
[TR]
[TD][/TD]

[TD]            [4] => b7cf82e7035d9deeed0058f741dd105f5f4efdd1[/TD]
[/TR]
[TR]
[TD][/TD]

[TD]            [5] => 62857d5ad6f3fe449f677e2771769a465e467ab6[/TD]
[/TR]
[TR]
[TD][/TD]

[TD]            [6] => 1b17c23b9de47f14228c987e50d5ef75b1bd365b[/TD]
[/TR]
[TR]
[TD][/TD]

[TD]            [7] => 2493f55acc6d63ebc25e0e06f421d0c9db15dc51[/TD]
[/TR]
[TR]
[TD][/TD]

[TD]            [8] => f4236b1f2d121ad56400b1010030feb2568a45ad[/TD]
[/TR]
[TR]
[TD][/TD]

[TD]            [9] => edf6627fabd7f5421f876aa409b754ee04c71546[/TD]
[/TR]
[TR]
[TD][/TD]

[TD]            [10] => a5e2ff8caa12942544c29bd0244b85d1b73b46b6[/TD]
[/TR]
[TR]
[TD][/TD]

[TD]            [11] => 76779f8388628f582faf346ac531d07c9521a1dc[/TD]
[/TR]
[TR]
[TD][/TD]

[TD]            [12] => 74ef016eaa829c92ea7b7261f163a60ab1e6bd96[/TD]
[/TR]
[TR]
[TD][/TD]

[TD]            [13] => 3c8e66b8a04f963caa6c3a1a68a4e28b3ec749eb[/TD]
[/TR]
[TR]
[TD][/TD]

[TD]            [14] => 19456ab9eb58026ab2a34d8d12a1c58f97d30104[/TD]
[/TR]
[TR]
[TD][/TD]

[TD]            [15] => 1821b88d40f99cf0681da48f2a262ff834bc3f42[/TD]
[/TR]
[TR]
[TD][/TD]

[TD]            [16] => 80801b23373b719838d392e1e35607d6c15ee60e[/TD]
[/TR]
[TR]
[TD][/TD]

[TD]            [17] => 14ad6188fc8ea3feebbb7808ed46ef61fc495e15[/TD]
[/TR]
[TR]
[TD][/TD]

[TD]        )[/TD]
[/TR]
[TR]
[TD][/TD]

[TD][/TD]
[/TR]
[TR]
[TD][/TD]

[TD]    [udp://tracker.coppersurfer.tk:6969/announce] => Array[/TD]
[/TR]
[TR]
[TD][/TD]

[TD]        ([/TD]
[/TR]
[TR]
[TD][/TD]

[TD]            [0] => 6503b9aacdc6a785d82c528eefb48e81168bdf85[/TD]
[/TR]
[TR]
[TD][/TD]

[TD]            [1] => 0e5e6e30a4ebabd2db230dccae867dad1307abe4[/TD]
[/TR]
[TR]
[TD][/TD]

[TD]            [2] => 6b87cfe72e81dfe4c22e39b7f6050d157a7a7523[/TD]
[/TR]
[TR]
[TD][/TD]

[TD]            [3] => 42bdef23779189520c51a2e2255b6963545c229f[/TD]
[/TR]
[TR]
[TD][/TD]

[TD]            [4] => b7cf82e7035d9deeed0058f741dd105f5f4efdd1[/TD]
[/TR]
[TR]
[TD][/TD]

[TD]            [5] => 62857d5ad6f3fe449f677e2771769a465e467ab6[/TD]
[/TR]
[TR]
[TD][/TD]

[TD]            [6] => 1b17c23b9de47f14228c987e50d5ef75b1bd365b[/TD]
[/TR]
[TR]
[TD][/TD]

[TD]            [7] => 2493f55acc6d63ebc25e0e06f421d0c9db15dc51[/TD]
[/TR]
[TR]
[TD][/TD]

[TD]            [8] => f4236b1f2d121ad56400b1010030feb2568a45ad[/TD]
[/TR]
[TR]
[TD][/TD]

[TD]            [9] => edf6627fabd7f5421f876aa409b754ee04c71546[/TD]
[/TR]
[TR]
[TD][/TD]

[TD]            [10] => a5e2ff8caa12942544c29bd0244b85d1b73b46b6[/TD]
[/TR]
[TR]
[TD][/TD]

[TD]            [11] => 76779f8388628f582faf346ac531d07c9521a1dc[/TD]
[/TR]
[TR]
[TD][/TD]

[TD]            [12] => 74ef016eaa829c92ea7b7261f163a60ab1e6bd96[/TD]
[/TR]
[TR]
[TD][/TD]

[TD]            [13] => 3c8e66b8a04f963caa6c3a1a68a4e28b3ec749eb[/TD]
[/TR]
[TR]
[TD][/TD]

[TD]            [14] => 19456ab9eb58026ab2a34d8d12a1c58f97d30104[/TD]
[/TR]
[TR]
[TD][/TD]

[TD]            [15] => 1821b88d40f99cf0681da48f2a262ff834bc3f42[/TD]
[/TR]
[TR]
[TD][/TD]

[TD]            [16] => 80801b23373b719838d392e1e35607d6c15ee60e[/TD]
[/TR]
[TR]
[TD][/TD]

[TD]            [17] => 14ad6188fc8ea3feebbb7808ed46ef61fc495e15[/TD]
[/TR]
[TR]
[TD][/TD]

[TD]        )[/TD]
[/TR]
[TR]
[TD][/TD]

[TD][/TD]
[/TR]
[TR]
[TD][/TD]

[TD])[/TD]
[/TR]
[TR]
[TD][/TD]

[TD][/TD]
[/TR]
[/TABLE]

Once you have done this you should split the arrays into chunks of 70 and pass them to the udpt scraper which is capable of making multiple requests.
If you use bitcoin-core then you can setup a callback when payments are received.

In theory you can do this:

Generate each user a bitcoin address and store that in the users table.

Once bitcoin-core obtains a transaction it will send your script a transaction id, you should store this in a table called pending transactions so that on a cron you can check each transaction, when enough confirmations have been made it's then safe to update the users account to make them a vip or whatever you want to do.
[USER=20338]@niki[/USER] These guys are correct, if your going to accept donations i would recommend using crypto.
Use sqlesc on that input
Yes.
I rather create new from scratch such as a PHP 7 version of BDecode


<?php

namespace System\Protocol;

class Bdecode
{
   /**
    * Bencode.
    *
    * @var string
    */
   protected $bencode;

   /**
    * Length.
    *
    * @var integer
    */
   protected $length = 0;

   /**
    * Offset.
    *
    * @var integer
    */
   protected $offset = 0;

   /**
    * Decode.
    *
    * @param  string $bencode
    * @return mixed
    */
   public function decode(string $bencode = null)
   {
       if ($this->bencode === null) {
           if ($bencode !== null) {
               $this->bencode = $bencode;
               $this->length  = strlen($bencode);
           } else {
               return null;
           }
       }

       if ($this->offset >= $this->length) {
           return null;
       }

       $char = $this->bencode[$this->offset];
       if ($char === 'd') {
           return $this->decodeDict();
       } elseif ($char === 'l') {
           return $this->decodeList();
       } elseif ($char === 'i') {
           return $this->decodeInt();
       } elseif (is_numeric($char)) {
           return $this->decodeStr();
       } else {
           return null;
       }
   }

   /**
    * Decode dictionary.
    *
    * @return array|null
    */
   private function decodeDict()
   {
       $start = substr($this->bencode, $this->offset, 1);
       if ($start !== 'd') {
           return null;
       }

       $limit = substr($this->bencode, -1);
       if ($limit !== 'e') {
           return null;
       }

       $this->offset++;

       $dict = [];
       while ($this->bencode[$this->offset] !== 'e') {
           $index = $this->decodeStr();
           if ($index === null) {
               return null;
           }
           $value = $this->decode();
           if ($value === null) {
               return null;
           }
           $dict[$index] = $value;
       }

       $this->offset++;

       return $dict;
   }

   /**
    * Decode list.
    *
    * @return array|null
    */
   private function decodeList()
   {
       $start = substr($this->bencode, $this->offset, 1);
       if ($start !== 'l') {
           return null;
       }

       $limit = substr($this->bencode, -1);
       if ($limit !== 'e') {
           return null;
       }

       $this->offset++;

       $list = [];
       while ($this->bencode[$this->offset] !== 'e') {
           $value = $this->decode();
           if ($value === null) {
               return null;
           }
           $list[] = $value;
       }

       $this->offset++;

       return $list;
   }

   /**
    * Decode integer.
    *
    * @return string|null
    */
   private function decodeInt()
   {
       $start = substr($this->bencode, $this->offset, 1);
       if ($start !== 'i') {
           return null;
       }

       $limit = strpos($this->bencode, 'e', $this->offset);
       if ($limit === false) {
           return null;
       }

       $this->offset++;

       $buffer = '';
       while ($this->offset < $limit) {
           $buffer .= $this->bencode[$this->offset];
           $this->offset++;
       }

       $this->offset++;

       if (preg_match('@^([0]|[-]?[1-9][0-9]*)$@', $buffer)) {
           return 0 + $buffer;
       } else {
           return null;
       }
   }

   /**
    * Decode string.
    *
    * @return string|null
    */
   private function decodeStr()
   {
       $delimiter = strpos($this->bencode, ':', $this->offset);
       if ($delimiter === false) {
           return null;
       }

       $length = substr($this->bencode, $this->offset, $delimiter - $this->offset);
       if (! preg_match('@^([0]|[1-9][0-9]*)$@', $length)) {
           return null;
       }
       $this->offset = ++$delimiter;

       $buffer = substr($this->bencode, $this->offset, $length);
       $strlen = strlen($buffer);
       if ($strlen != $length) {
           return null;
       }
       $this->offset += $length;

       return $buffer;
   }
}
Indeed, but there are alot of things missing that would significantly improve the script.
I was thinking about launching my own project which would be like what they offer, if i decide to go along with it then i will make a library for it.
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