newb Posted April 16, 2010 Share Posted April 16, 2010 is it possible for php script to download a torrent file like a bittorrent client would? Quote Link to comment Share on other sites More sharing options...
Alex Posted April 16, 2010 Share Posted April 16, 2010 Yes. Quote Link to comment Share on other sites More sharing options...
l0ve2hat3 Posted April 16, 2010 Share Posted April 16, 2010 <?php $data=file_get_contents("http://torrents.thepiratebay.org/5403603/Wicked_Cool_PHP_Real-World_Scripts_That_Solve_Difficult_Problems.5403603.TPB.torrent"); $fh=fopen("torrent.torrent","w"); fwrite($fh,$data); fclose($fh); ?> Quote Link to comment Share on other sites More sharing options...
oni-kun Posted April 16, 2010 Share Posted April 16, 2010 That solution should work provided the torrent tracker accepts a non-chunk encoded handle to the peers, otherwise the tracker may drop the connection. Quote Link to comment Share on other sites More sharing options...
ignace Posted April 16, 2010 Share Posted April 16, 2010 You can use love2hate's solution to download the torrent to your server. You'll need a proper understanding of the torrent-protocol to actually perform the downloading. The specification can be found on bittorrent http://bittorrent.org/beps/bep_0003.html Quote Link to comment 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.