Jump to content


Photo

torrent tracker announce request


  • Please log in to reply
No replies to this topic

#1 keenk

keenk
  • New Members
  • Pip
  • Newbie
  • 3 posts

Posted 06 June 2006 - 10:27 PM

after searching for scripts that would help me interface php with torrent trackers, i could not put my finger on what is causing the following problem.

i wrote a short script that opens a torrent file, computes its info_hash and returns the announce url necessary to fetch the torrent's information.

for example, the file 'Camera.Obscura.-.Let-'s.Get.Out.Of.This.Country.[2006].torrent' that i found on torrentspy gives me the following url:

[a href=\"http://btbeat.com:2710/announce?info_hash=ifq%40fT%8F%EE%94%14%D1%1F%EE%AAW%DE%9C%ACF%AC&peer_id=keenk-0000-0000-0000&numwant=1000&no_peer_id=1\" target=\"_blank\"]http://btbeat.com:2710/announce?info_hash=...00&no_peer_id=1[/a]

if you copy paste it in your browser, it returns a bencoded dictionary with relevant information.

now the problem, where $url is equal to the complete previously stated announce url, shows the following warning:
Warning: fsockopen(): unable to connect to 66.232.98.29:2710 in /usr/local/lib/php/Net/Socket.php on line 108.

require_once "HTTP/Request.php";
$req =& new HTTP_Request();        
$req->setMethod(HTTP_REQUEST_METHOD_GET);
$req->setURL($url);
$req->clearPostData();
if (!PEAR::isError($req->sendRequest())) {
     $response = $req->getResponseBody();
} else {
     $response = "error";
}
echo $response;

is there a restriction on my side or on the tracker side?







0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users