View Single Post
  #4  
Old 26th May 2008, 13:42
djlee's Avatar
djlee djlee is offline
Senior Member
 
Join Date: Mar 2008
Posts: 183
Default Re: how to block torrent clients ?
open announce.php

Find
Code:
function portblacklisted($port)
above that add this code
Code:
$useragent = substr($peer_id, 1, 2);
$agentversion = substr($peer_id, 3, 4);
if(($useragent != "UT" || ($useragent == "UT" && $agentversion < 1700) )
err("Client is banned. Please Use The Latest Version Of Utorrent");
what this does is first gets the client and the version the user is using .. then in the IF statement it checks your using utorrent first... then checks if your using a higher version than 1.7 .. you can remove the ban on the versions if you wish so u only check for utorrent clients and not there version but older version of utorrent do have bugs that can mess things up hence why i left this code in for ya

its pretty simple to add/remove allowed clients and client versions in the future :)
Reply With Quote