Forum Replies Created

Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter tomsko

    (@tomsko)

    Ok you can close this topic, I found an answer! This script will work with all PirateBay Torrents. It screen scapes peers.

    <?php
    $data = file_get_contents("http://link-to-piratebay-torrent-page.com");
    preg_match("#<dt>Seeders:<\/dt>\s*<dd>(.*)<\/dd>#iU", $data, $match1);
    preg_match("#<dt>Leechers:<\/dt>\s*<dd>(.*)<\/dd>#iU", $data, $match2);
    echo $match1[1]; //seeders
    echo $match2[1]; //leechers
    ?>

    Thread Starter tomsko

    (@tomsko)

    I already wrote PHP code, as it turns out Javascript can’y do that. At all 🙂
    Just in case anyone is looking –

    <?php
    $data = file_get_contents("http://website.com");
    preg_match("#<dt>Seeders:<\/dt>\s*<dd>(.*)<\/dd>#iU", $data, $match1);
    preg_match("#<dt>Leechers:<\/dt>\s*<dd>(.*)<\/dd>#iU", $data, $match2);
    echo $match1[1]; //seeders
    echo $match2[1]; //leechers
    ?>

Viewing 2 replies - 1 through 2 (of 2 total)