Jump to content

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?


Link to comment
https://forums.phpfreaks.com/topic/11371-torrent-tracker-announce-request/
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

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.