Main
•
Digg Sucks
•
Digg traffic is worthless
Code to block Digg & other social sites.
Digg Block (PHP)
Place this at the very beginning of any page you want blocked.
Digg Block (JavaScript)
The first code will need to be saved as a PHP file to be referenced by the second code.
Save as fftest.php
<? $userAgent=strtolower($_SERVER['HTTP_REFERER']); if((strstr($userAgent, 'digg'))||(strstr($userAgent, 'reddit'))||(strstr($userAgent, 'stumbleupon'))||(strstr($userAgent, 'netscape'))) { header("Location: http://whydiggisblocked.com"); exit(); } ?>
<? $userAgent=strtolower($_SERVER['HTTP_REFERER']); if((strstr($userAgent, 'digg'))||(strstr($userAgent, 'reddit'))||(strstr($userAgent, 'stumbleupon'))||(strstr($userAgent, 'netscape'))) { echo "window.location='http://whydiggisblocked.com/';"; } ?>
JavaScript
insert in the HEAD section of any page your want blocked.
<script src="fftest.php"></script>