keenk Posted June 6, 2006 Share Posted June 6, 2006 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? Quote Link to comment https://forums.phpfreaks.com/topic/11371-torrent-tracker-announce-request/ Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.