php - Uploading files to server form torrent -
i looking information how upload files server uploading .torrent files related files wan upload server.
looking way programming...
answers in advance.
edit: ok try emplane it.
lets user creates torrent file , starts seed it. uploads file.torrent file website , .torrent file seeded files downloaded server. imagine happening in 2 ways:
- the files downloaded torrent stream (that many other users seeding file)
- the script figures out on users machine file , uploads it.
first, have install torrent client on server. deluge , rtorrent options server operations. rtorrent famous it's high-performance seeding, while deluge's underlying libtorrent-rasterbar more up-to-date bittorrent protocol specs performing better leeching. both of them provide apis integration third-party tools.
when install torrent client, can activate download 2 alternative methods: ether putting users' .torrent files deluge/rtorrent's watch directory, or using respective apis add new torrent session.
have in mind possible duplicate of torrent names - different torrents can claim same file- or directory name ({info}{name} property .torrent file), leading corrupted data both torrents.
you have different ways deal situation depending on use of downloaded data. if need continue seeding data after 100% of it, can either reject next torrent same {info}{name} field, or have patch torrent client in order store data under unique name (torrent's info-hash seems choice). if don't want become seeder, when finished, remove the torrent deluge/rtorrent's session (api call. removing .torrent file watch directory works rtorrent afaik) , move actual data downloaded new place under new name (again, info-hash choice).
Comments
Post a Comment