PHP Deny Code; Block BT, Korean Telecom, TalkTalk, Brazil, and Phorm Using PHP

If you have access to PHP capabilities, but not Apache .htaccess deny directives, this PHP script will block BT Group, Korea Telecom, and Brazilian users from your web site.

Note; the BT block lists include one of their subsidiaries, Plusnet. Despite protests from Plusnet, they are simply a trading name of BT Retail (and not an independent company). Though Plusnet claimed their customers would be protected from Phorm, apparently that was not true. Plusnet's CEO is Anthony Vollmer, former General Manager of Voice Propositions in BT Retail.

Concerning the Phorm announcement of a trial in Brazil, web sites outside Brazil  can block the whole country using lists provided by sites such as blockacountry.com (no relation to this site). The PHP script below uses this data to block the whole of Brazil using PHP.

TalkTalk are presently operating an illegal communications system supplied by Chinese vendor Huawei. Huawei and Phorm are commercial partners.

RomTelecom were announced to be Phorm partners on 28 September 2011.

Pros; likely to reliably block Phorm, Cons; doesn't test for Phorm

Download the
BT PHP Deny script.
(UK Phorm Partner)

Download the
Korea Telecom PHP Deny script.
(Korean Phorm Partner)

Download the
TalkTalk PHP Deny script.
(UK Huawei/Phorm Partner)

Download the
Whole of Brazil PHP Deny script.
(nb include all Brazil ISPs)

 

Download the
RomTelecom PHP Deny Script.
(Romanian Phorm Partner)

 

Installation Notes

Simply include the code in your PHP pages using the following function;

<?php
require_once("php_deny.php");
?>

Custom Warning Pages

To create a custom access denied message, you will need to edit the PHP script.

28-Sep-11; Added RomTelecom list
27-Nov-10; Updated advice wrt TalkTalk/Huawei
30-Mar-09; Created Korean Telecom KORNET block list
13-Dec-08; Added new Phorm IP address ranges to BT list