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

"serph, post: 67014, member: 1398":

its working on my main tracker whats the annonce url your trying to scrape ?
can someone else try this script before i start debugging it all just to make sure it isnt an issue at shadows end

i've tried to add a specific tracker on $tracker, it shows all stats as 0 on localhost. Someone should test it as well.
Error: No scrape response.
Connection error: yes
If we fix this starting part, we will have very advance scraping tool with speed of 2 seconds per scraping :D
 
$TorrentInfo = ParseTorrent("$site_config[torrent_dir]/$rowu[id].torrent"); // Takes results from /backend/parse.php - BAD
$ann         = $TorrentInfo[0]; // Takes announces from /backend/parse.php - BAD
$annlist     = array(); // Takes announce array from /backend/parse.php - BAD

if ($TorrentInfo[6]) { // Takes results from /backend/parse.php - BAD
foreach ($TorrentInfo[6] as $ann) {
$annlist[] = $ann[0]; // Takes announces from /backend/parse.php - BAD }
} 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;
This part is checking if stats are taken from backend/parese.php

  if ($stats['seeds'] != -1) {
                       $seeders += $stats['seeds'];
                       $leechers += $stats['peers'];
                       $downloaded += $stats['downloaded'];


It should be like this to take stats from backend/udptscraper.php
if (scrape['seeders'] != -1) {
$seeders += $scrape['seeders'];
$leechers += $scrape['leechers'];
$downloaded += $scrape['completed'];


1# Part which updates SQL with new stats is incorrect it takes data from backend/parese.php
[color=rgb(247, 218, 100)]SQL_Query_exec("UPDATE `announce` SET `online` = 'yes', `seeders` = '".$seeders."', `leechers` = '".$leechers."', `times_completed` = '".$downloaded."' WHERE `url` = ".sqlesc($ann)." AND `torrent` = $rowu[id]");[/color]

2# Find
[color=rgb(250, 197, 28)]$resu = SQL_Query_exec("SELECT id, info_hash FROM torrents WHERE external = 'yes' AND id = $id");[/color]
2.2# Change it to:
[color=rgb(250, 197, 28)]$resu = SQL_Query_exec("SELECT id, info_hash, announce FROM torrents WHERE external = 'yes' AND id = $id");[/color]

1.1# Now it should look like this:
[color=rgb(247, 218, 100)]SQL_Query_exec("UPDATE `announce` SET `online` = 'yes', `seeders` = '".$seeders."', `leechers` = '".$leechers."', `times_completed` = '".$downloaded."' WHERE `url` = ".resu[announce]." AND `torrent` = $resu[id]");[/color]
[color=rgb(84, 172, 210)]--------------------------------------------------------------------------------------------------------------
READ THIS THREAD CAREFULLY, ONCE THIS IS FIXED, TORRENTTRADER WILL HAVE MOST ACCURATE AND THE FASTEST SCRAPER THERE IS.

ALSO YOU WILL BE ABLE TO INSTANTLY SCRAPE 100+ TORRENTS WITHOUT ANY TIMEOUT.

HELP IF YOU CAN.
--------------------------------------------------------------------------------------------------------------[/color]


Okay. Current udp scraper which we have here is [color=rgb(247, 218, 100)]not using the udptscraper.php to scrape hash[/color], it is using backend/parse.php which is very slow, bad and scrapes torrent file instead.

udptscraper.php is scraping info_hash and is instant, right now we scrape .torrent files which is slow and inaccurate.

[color=rgb(243, 121, 52)]Example:[/color]
Create new PHP file and add
<?php
include "backend/udptscraper.php";
try{
   $timeout = 2;

   $scraper = new udptscraper($timeout);
   $ret = $scraper->scrape('udp://tracker.leechers-paradise.org:6969',array('B3D90865B2C831802CEC740933043EF50A2B6313'));

   print_r($ret);
}catch(ScraperException $e){
   echo('Error: ' . $e->getMessage() . "<br />\n");
   echo('Connection error: ' . ($e->isConnectionError() ? 'yes' : 'no') . "<br />\n");
}


[color=rgb(243, 121, 52)]Result: (Less than 1 second scraping)[/color]
Array ( [B3D90865B2C831802CEC740933043EF50A2B6313] => Array ( [seeders] => 59 [completed] => 435 [leechers] => 3 [infohash] => B3D90865B2C831802CEC740933043EF50A2B6313 ) ) 


------------------
We do have this option in scrape code, but the script prioritize this wrong part
 $TorrentInfo = ParseTorrent("$site_config[torrent_dir]/$rowu[id].torrent");
               $ann         = $TorrentInfo[0];
               $annlist     = array();


[USER=20288]@m-jay[/USER] [USER=311]@MicroMonkey[/USER] [USER=3]@Munk[/USER] [USER=1398]@serph[/USER] [USER=1]@DarkMaster[/USER]
"m-jay, post: 66981, member: 20288":

No I tried a few times but couldn't get it working, spent most of weekend working on moving the backend, might try replacing account.php with original to see if I can get it to work

I tried almost anything with many variations, the closest I got is that all emails are already in use when saving settings ??
Did you find some way at this [USER=20288]@m-jay[/USER]?
Thanks.

$tlang = @mysqli_fetch_array(@SQL_Query_exec("SELECT torrentlang FROM torrents WHERE id=$id"));

Edit: For those wondering, I just added images and linked number to images <img src="/images/langs/".$tlang["torrentlang"].".png" />
How do we show a torrent language field into the torrent listing?

"m-jay, post: 66964, member: 20288":

I see what you mean cant get it working, encrypt maybe effecting it,  I'll try again today and post what I've tried

When testing directly via SQL
select count(*) from users where email='your_email' != 'input_mail';

It works perfectly, but i don't know why it doesn't work in account.php
"m-jay, post: 66962, member: 20288":

Where and what have you tried m8 for account it would be just under this line
        $email = $_POST["email"];
For account details I think it might be admin-modtasks

I have tried, but it doesn't work. Maybe because of email encrypt?
Bumping this. Still can't solve it.
"serph, post: 66952, member: 1398":

the old scraper looked like this in torrent-details.php


   if ($row["external"]=='yes'){

       if ($scrape =='1'){
           print("<td valign='top' align='right'><b>Tracked: </b>EXTERNAL<br /><br />");
           $seeders1 = $leechers1 = $downloaded1 = null;

           $tres = SQL_Query_exec("SELECT url FROM announce WHERE torrent=$id");
           while ($trow = mysql_fetch_array($tres)) {
               $ann = $trow["url"];
               $tracker = explode("/", $ann);
               $path = array_pop($tracker);
               $oldpath = $path;
               $path = preg_replace("/^announce/", "scrape", $path);
               $tracker = implode("/", $tracker)."/".$path;

               if ($oldpath == $path) {
                   continue; // Scrape not supported, ignored
               }

               // TPB's tracker is dead. Use openbittorrent instead
               if (preg_match("/thepiratebay.org/i", $tracker) || preg_match("/prq.to/", $tracker)) {
                   $tracker = "http://tracker.openbittorrent.com/scrape";
               }

               $stats = torrent_scrape_url($tracker, $row["info_hash"]);
               if ($stats['seeds'] != -1) {
                   $seeders1 += $stats['seeds'];
                   $leechers1 += $stats['peers'];
                   $downloaded1 += $stats['downloaded'];
                   SQL_Query_exec("UPDATE `announce` SET `online` = 'yes', `seeders` = $stats[seeds], `leechers` = $stats[peers], `times_completed` = $stats[downloaded] WHERE `url` = ".sqlesc($ann)." AND `torrent` = $id");
               } else {
                   SQL_Query_exec("UPDATE `announce` SET `online` = 'no' WHERE `url` = ".sqlesc($ann)." AND `torrent` = $id");

               }
           }
                                         
           if ($seeders1 !== null){ //only update stats if data is received
               print ("<b>".T_("LIVE_STATS").": </b><br />");
               print ("Seeders: ".number_format($seeders1)."<br />");
               print ("Leechers: ".number_format($leechers1)."<br />");
               print (T_("COMPLETED").": ".number_format($downloaded1)."<br />");

               SQL_Query_exec("UPDATE torrents SET leechers='".$leechers1."', seeders='".$seeders1."', times_completed='".$downloaded1."',last_action= '".get_date_time()."',visible='yes' WHERE id='".$row['id']."'");
           }else{
               print ("<b>".T_("LIVE_STATS").": </b><br />");
               print ("<font color='#ff0000'>Tracker Timeout<br />Please retry later</font><br />");
           }

           print ("<form action='torrents-details.php?id=$id&amp;scrape=1' method='post'><input type=\"submit\" name=\"submit\" value=\"Update Stats\" /></form></td>");
       }else{
           print ("<td valign='top' align='right'><b>Tracked:</b> EXTERNAL<br /><br /><form action='torrents-details.php?id=$id&amp;scrape=1' method='post'><input type=\"submit\" name=\"submit\" value=\"Update Stats\" /></form></td>");
       }
   }

   echo "</tr></table>";
}
echo "</div></td></tr></table></center><br /><br />";


That one is leaving tracker timeout :/
"serph, post: 66950, member: 1398":

I'll take a look at the old way it was done I'm sure the stats we're split as the backup announce trackers got $stats[seeds] and the torrent was updated with $seeders1 or something

From where you got that old scraper? Can you post a link?
[USER=311]@MicroMonkey[/USER] [USER=20288]@m-jay[/USER] [USER=1398]@serph[/USER]

Here's how it needs to work, taking only the highest stats out of all trackers, not merging all together (Taken from [url="http://www.torrentgalaxy.to"]www.torrentgalaxy.to[/url])
They should just follow the pattern of post #7
"serph, post: 66944, member: 1398":

[USER=20311]@shadows[/USER] i put that in the description and i get this (btw i like the pun lol )

[ATTACH]5111[/ATTACH]

still no error just posts it

yeah, that's because i used some mod from here for center bbcode. It was the fault of regular expression. So I rewrote them all
"spiritblue, post: 66942, member: 401":

no, considering the tag is already defined i do not have to do the other two

Not really. You hardcoded [align=center] so you will need to repeat it 2 more times or use regex via str_split();
regex expression is faster on load + that's a very bad practice where you will need to repeat 3 times same thing for right and left and center side which will load 3-time queries if someone uses it in post.
This is a fix. And it doesn't change the fact it's a dogshit.
+ bbcodes are not cached which means on every page refresh + X queries are loaded -.-
    // [align=?]Text[/align]
      $s = preg_replace("#\[align=(left|center|right|justify)\](.*?)\[/align\]#si ", "<div style=\"text-align: $1;\">$2</div>", $s);
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: 3
  • Members: 0
  • Guests online: 3
  • Comments: 3
  • Messages: 1,728