You can get past the time limit that PHP has set by default in the php.ini file. However if your hosts sees this they might lock your account. Most shared hosting providers will lock your account if you use more than say 3% of the machines resources. Trying to write a bittorent client in PHP is absurd unless you have a dedicated machine to run it upon.
add this to your configuration file or any file that is included on every request.
// A Timeout of 5 minutes
ini_set('max_execution_time', 300);
Note that you have to specify the time in seconds unless you do something like the following
$timeout_minutes = 5;
ini_set('max_execution_time', 60 * $timeout_minutes);