View Single Post
  #11  
Old 4th July 2012, 12:43
Simulator Simulator is offline
Member
 
Join Date: Jun 2012
P2P
Posts: 14
Default
Tried to downgrade until Utorrent 1.8.2, still no work.

But what does it mean, if i get in scrape.php?info_hash=F2F1A5D743274E5EC :

d5:filesdee

?

I'm using this scrape.php:

Code:
<?php

//ts scrape fixed by NightCrawler for TS 5.6 26/06/2010

function fast_db_connect ()
  {
    $dbfile = './config/DATABASE';
    if (!file_exists ($dbfile))
    {
      exit ('DATABASE Configuration file does not exists');
      return null;
    }

    $data = unserialize (@file_get_contents ($dbfile));
    if (!($connect = mysql_connect ($data['mysql_host'], $data['mysql_user'], $data['mysql_pass'])))
    {
      exit ('Error: Mysql Connection!');
      ;
    }

    if (!(mysql_select_db ($data['mysql_db'], $connect)))
    {
      exit ('Error: Mysql DB Selection!');
      ;
    }

    unset ($data);
  }

  
    
  fast_db_connect();

function hash_where($name, $hash) 
  {
    $shhash = strtolower("('$hash')");
    return "$name = '" . mysql_real_escape_string($hash) . "'";
  }


  $r = 'd5:filesd';

  $fields = "info_hash, times_completed, seeders, leechers";
  
  if (get_magic_quotes_gpc())
  $info_hash = stripslashes($_GET["info_hash"]);
  
  if (!isset ($info_hash))
  {
    exit ('Permission denied!');
  }
  
  if (!isset($info_hash))
    $query = "SELECT $fields FROM torrents ORDER BY info_hash";
  else
    $query = "SELECT $fields FROM torrents WHERE " . hash_where( "info_hash", @pack('H*', stripslashes( $info_hash ) ));

  $res = mysql_query($query);

  while ($row = mysql_fetch_assoc($res))
  {
    $r .= '20:'.str_pad($row['info_hash'], 20).'d8:completei'.$row['seeders'].'e10:downloadedi'.$row['times_completed'].'e10:incompletei'.$row['leechers'].'ee';
  }

  $r .= 'ee';

  header("Content-Type: text/plain");
  echo $r;
  
mysql_close();
?>
EDIT: Finally made it, i have this when i enter a hash in scrape.php:

d5:filesd20:’ťšÁŹŤ!ćgŕä˝Ŕâ@d8:completei1e10:d ownloadedi0e10:incompletei0eeee

But in utorrent still there's no seeders and leechers in trackers tab!

Last edited by Simulator; 4th July 2012 at 13:57. Reason: bonus information added
Reply With Quote