i'm trying to scrape a torrent tracker for seeders and leechers using PHP.
This is the hash value returned by torcahche: 7026AB638744F2BD2444033A8730DA146E15A886
Following trackers come with the torrent:
udp://tracker.openbittorrent.com:80/announce
udp://tracker.publicbt.com:80/announce
udp://tracker.ccc.de:80/announce
these are the methods that i have tried to get the info i need:
$orig="7026AB638744F2BD2444033A8730DA146E15A886";
$infoHash=$orig;
$nfo='udp://tracker.openbittorrent.com:80/scrape?hash_id='.$infoHash;
echo '<br>'.$nfo;
$gitsl=$this->input->get($nfo);
print_r($gitsl);
$infoHash=pack('H',$orig);
$nfo='udp://tracker.openbittorrent.com:80/scrape?hash_id='.$infoHash;
echo '<br>'.$nfo;
$gitsl=$this->input->get($nfo);
print_r($gitsl);
$infoHash=hex2bin($orig);
$nfo='udp://tracker.openbittorrent.com:80/scrape?hash_id='.$infoHash;
echo '<br>'.$nfo;
$gitsl=$this->input->get($nfo);
print_r($gitsl);
$infoHash='%70%26%AB%63%87%44%F2%BD%24%44%03%3A%87%30%DA%14%6E%15%A8%86% ';
$nfo='udp://tracker.openbittorrent.com:80/scrape?hash_id='.$infoHash;
echo '<br>'.$nfo;
$gitsl=$this->input->get($nfo);
print_r($gitsl);
So getting nothing, the following questions have risen:
- Is the hash provided by torchache correct?
- Is a simple get request really all you need to get the info back?
- Is that even how you do a get request in codeigniter?
- Is there something wrong with the torrent file itself?
I've also tried multiple sites that allow you to manually type in hash info for a scrape, all unsucessful.
Hope somebody can help, cheers.