Jump to content

Archived

This topic is now archived and is closed to further replies.

keenk

torrent tracker announce request

Recommended Posts

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.

[code]
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;
[/code]

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


Share this post


Link to post
Share on other sites

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.