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? Link to comment https://forums.phpfreaks.com/topic/198704-php-torrenting/ Share on other sites More sharing options...
Alex Posted April 16, 2010 Share Posted April 16, 2010 Yes. Link to comment https://forums.phpfreaks.com/topic/198704-php-torrenting/#findComment-1042803 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); ?> Link to comment https://forums.phpfreaks.com/topic/198704-php-torrenting/#findComment-1042809 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. Link to comment https://forums.phpfreaks.com/topic/198704-php-torrenting/#findComment-1042843 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 Link to comment https://forums.phpfreaks.com/topic/198704-php-torrenting/#findComment-1043021 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.