Bravo List
Register
Go Back   > Bravo List > Source Code > Active Trackers > Torrent Trader
Reply
  #1  
Old 2nd September 2015, 18:05
Extremlym's Avatar
Extremlym Extremlym is offline
Senior Member
 
Join Date: Oct 2012
P2P
Posts: 102
Default TT 2.7 DHT error
TT 2.7 DHT error udp:// wont scrape ....
is any sollution?? i don't wont to change my source ... or upgrade to 2,8 because i have over 40,000 users . over 50.000 torrents and aloth of work on design etc... need an actual sollution
Reply With Quote
  #2  
Old 2nd September 2015, 18:32
DND DND is offline
VIP
 
Join Date: Dec 2008
Posts: 1,241
Default
the scrape function is broken in TT.. TT doesn't support udp scrape, you need to install a small modification, but that modification won't always work
Abanddon external torrents. They aren't any good to anyone.
Pace tie!
__________________
Need HELP!? I can install:

  1. Server/VPS (Debian,CentOS,Ubuntu,Fedora, FreeBSD) Optimization and ... + Modules
  2. Webserver Windows/Linux (Apache/Lighttpd/Nginx/Mysql/PhpMyAdmin/SSL) Optimization and ... + Modules
  3. Seedbox Windows/Linux (uTorrent,rTorrent,libTorrent,ruTorrent) + Modules
  4. Multiple source code engines
  5. Linux Server Administration (security, cryptography/encryption, proxy, load balancer, custom ddos firewall)
Reply With Quote
  #3  
Old 4th September 2015, 22:53
RGSHARON's Avatar
RGSHARON RGSHARON is offline
Member
 
Join Date: Apr 2014
India
Posts: 3
Arrow udp scrape
you can scrape udp trackers on tt script u need udptscraper.php,tscraper.php&mega-scraper.php

You can find it here https://github.com/johannes85/PHP-Torrent-Scraper

Place the udptscraper in backend folder and place tscraper in your root directory

Code for Mega-scrape.php
PHP Code:
<?php
#============================#
#  TorrentTrader v2.08       #
#  http://torrenttrader.org  #
#----------------------------#
#  Modified by BigMax        #
#============================#

require_once("backend/functions.php");
require_once(
"backend/BDecode.php");
require_once(
"backend/parse.php");
require_once(
"backend/udptscraper.php");
dbconn(false);


    
set_time_limit(0);
    
$interval 60// Rescrape torrents every 2 days
    
$ts gmtime() - $interval;
    
$res mysql_query("SELECT id, name, info_hash FROM torrents WHERE external = 'yes' AND last_action <= FROM_UNIXTIME($ts) ORDER BY last_action DESC LIMIT 1");
    
$count get_row_count("torrents""WHERE external = 'yes' AND last_action <= FROM_UNIXTIME($ts)");

    while (
$row mysql_fetch_array($res))
    {
        
$TorrentInfo ParseTorrent("$site_config[torrent_dir]/$row[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;
        echo 
"<br><font color=blue><b>Torrent ID: $row[id]</b></font> - <b>$row[name]</b><br><font color=blue><b>Info Hash: $row[info_hash]</b></font><br>";
        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)
            {
                echo 
"<br><b>$ann</b>: Scrape not supported.<br>";
                continue;
            }

            
// TPB's tracker is dead. Use openbittorrent instead
            
if ($openbittorrent_done)
                continue;

            if (
preg_match("/thepiratebay.org/i"$tracker) || preg_match("/prq.to/"$tracker))
            {
                
$tracker "udp://tracker.publicbt.com:80/scrape";
                
$openbittorrent_done 1;
            }

            if(
preg_match('%udp://([^:/]*)(?::([0-9]*))?(?:/)?%si'$tracker))
            {
                
$udp=true;
                try
                {
                    
$timeout 10;
                    
$udp= new udptscraper($timeout);
                    
$stats=$udp->scrape($tracker,$row["info_hash"]);
                    foreach (
$stats as $id=>$scrape)
                    {
                        
$seeders += $scrape['seeders'];
                        
$leechers += $scrape['leechers'];
                        
$downloaded    += $scrape['completed'];
                    }
                }
                catch(
ScraperException $e)
                {
                    
//echo('<br>Error: ' . $e->getMessage() . "\n");
                    //echo('Connection error: ' . ($e->isConnectionError() ? 'yes' : 'no') . "\n");
                
}
            }
            else
            {
                
$stats torrent_scrape_url($tracker$row["info_hash"]);
            }

            if (
$stats['seeds'] != -1)
            {
                
$seeders += $stats['seeds'];
                
$leechers += $stats['peers'];
                
$downloaded += $stats['downloaded'];
                
                echo 
"<table class='table table-bordered'><thead><tr>
                
        <th>TRACKER NAME</th>
                
                <th>Seeders:</th> <br>
                <th>Leechers:</th> <br>
            <th>Downloaded:</th><br>
            
      </tr></thead><tbody><tr>
                <td><b>
$ann</b><br></td>
                <td>"
.($udp?$scrape['seeders']:$stats["seeds"])."</td><td>".($udp?$scrape['leechers']:$stats["peers"])."</td><td> ".($udp?$scrape['completed']:$stats["downloaded"])."</td></tr></tbody></table>";
                
                
                
mysql_query("UPDATE announce  SET  online='yes', 
seeders="
.($udp?$scrape['seeders']:$stats["seeds"]).",
 leechers="
.($udp?$scrape['leechers']:$stats["peers"]).", times_completed= ".($udp?$scrape['completed']:$stats["downloaded"]).
WHERE url='
$ann'  AND torrent='$row[id]' "); 
            }
            else
            {
                echo 
"<br><b>$ann</b>: <font color=red>Tracker timed out.</font><br>";
                
mysql_query("UPDATE announce  SET online='no'  WHERE url='$ann'  AND  torrent='$row[id]' ");
            }
        }

        if (
$seeders !== null)
        {
            echo 
"<br><b>Totals:</b><br>";
            echo 
"Seeders: $seeders<br>";
            echo
"Leechers: $leechers<br>";
            echo 
"Completed: $downloaded<br><br>";
            
mysql_query("UPDATE torrents SET leechers = '".$leechers."', seeders = '".$seeders."', times_completed = '".$downloaded."', last_action = '".get_date_time()."', visible = 'yes' WHERE id = '".$row['id']."'");
        }
        else
        {
            echo 
"<br><b><font color=red>All trackers are timed out.</font></b><br>";
            
mysql_query("UPDATE torrents SET last_action = '".get_date_time()."' WHERE id = '".$row['id']."'");
        }
    }
    

?>

<script language="JavaScript">
    //configure refresh interval (in seconds)
    <?php if ($count)
    echo 
"var countDownInterval = 10;";
    else
    echo 
"var countDownInterval = 25;"// No torrents to scrape, refresh in 15 minutes
    
?>
    //configure width of displayed text, in px (applicable only in NS4)
    var c_reloadwidth=200
</script>

    <ilayer id="c_reload" width=&{c_reloadwidth}; ><layer id="c_reload2" width=&{c_reloadwidth}; left=0 top=0></layer></ilayer>

<script>
    var countDownTime=countDownInterval+1;
    function countDown(){
    countDownTime--;
    if (countDownTime <=0){
    countDownTime=countDownInterval;
    clearTimeout(counter)
    window.location.reload()
    return
    }
    if (document.all) //if IE 4+
    document.all.countDownText.innerText = countDownTime+" ";
    else if (document.getElementById) //else if NS6+
    document.getElementById("countDownText").innerHTML=countDownTime+" "
    else if (document.layers){ //CHANGE TEXT BELOW TO YOUR OWN
    document.c_reload.document.c_reload2.document.write('Next <a href="java script:window.location.reload()">refresh</a> in <b id="countDownText">'+countDownTime+' </b> seconds')
    document.c_reload.document.c_reload2.document.close()
    }
    counter=setTimeout("countDown()", 1000);
    }

    function startit(){
    if (document.all||document.getElementById) //CHANGE TEXT BELOW TO YOUR OWN
    document.write('Next <a href="javascript:window.location.reload()">refresh</a> in <b id="countDownText">'+countDownTime+' </b> seconds')
    countDown()
    }

    if (document.all||document.getElementById)
    startit()
    else
    window.onload=startit
</script>
<br><br>

Last edited by RGSHARON; 4th September 2015 at 23:22.
Reply With Quote
  #4  
Old 4th September 2015, 22:59
DND DND is offline
VIP
 
Join Date: Dec 2008
Posts: 1,241
Default
5 years ago.. really ?
__________________
Need HELP!? I can install:

  1. Server/VPS (Debian,CentOS,Ubuntu,Fedora, FreeBSD) Optimization and ... + Modules
  2. Webserver Windows/Linux (Apache/Lighttpd/Nginx/Mysql/PhpMyAdmin/SSL) Optimization and ... + Modules
  3. Seedbox Windows/Linux (uTorrent,rTorrent,libTorrent,ruTorrent) + Modules
  4. Multiple source code engines
  5. Linux Server Administration (security, cryptography/encryption, proxy, load balancer, custom ddos firewall)
Reply With Quote
  #5  
Old 4th September 2015, 23:16
RGSHARON's Avatar
RGSHARON RGSHARON is offline
Member
 
Join Date: Apr 2014
India
Posts: 3
Default
Quote:
Originally Posted by DND;4745his 2
5 years ago.. really ?
That php classes are 5 year old but its still working good u can test it
Reply With Quote
  #6  
Old 5th September 2015, 10:50
firefly007's Avatar
firefly007 firefly007 is offline
SUPPORT GURU
 
Join Date: Jun 2010
P2P
Posts: 721
Default
Quote:
Originally Posted by Extremlym View Post
TT 2.7 DHT error udp:// wont scrape ....
is any sollution?? i don't wont to change my source ... or upgrade to 2,8 because i have over 40,000 users . over 50.000 torrents and aloth of work on design etc... need an actual sollution
Its possible if you are using a VPS or dedi to write a script that will scrape a few of the bigger site to get seeders leechers and peers using preg_match or even Simple Html Dom class and then use crontab to execute the script and update the torrent table in staggered intervals
__________________




Please Support Majority Report


You can contact me on Skype live:phesadent.elect but please let me know first.


If you are ever need me desperately then please email me at dan.oak44@gmail.com and I will contact u within a week.


Due to free time I'm able to help interested member's with their tracker.

Please Note!
Depending on your requests I will charge you for my assistance for Tracker installs and mods.
All my mods are custom and prices will very depending on the request.
I'm able to install any tracker and mods including themes.

Please PM me

Reply With Quote
Reply

Tags
27 , dht , error , tt

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 00:18. vBulletin skin by ForumMonkeys. Powered by vBulletin® Version 3.8.11 Beta 3
Copyright ©2000 - 2024, vBulletin Solutions Inc.