I can't see this to be a job for PHP. If I understand what you want to do correctly, it will not work at all on shared hosting due to the time limit a PHP script can run in.
Any torrent upload or download process that takes longer than the allowed 30 or 60 seconds would have to jump to the next page, reconnect, and restart the action. I can't see how this could work.
I think the best you can do in PHP is serve a file to a torrent site that takes care of the seeding. Clearbits (used by SO to provide the montly data dump) might be a useful service for that (but it's not free.)