Skip to content

Instantly share code, notes, and snippets.

aardvark857

Block or report user

Report or block aardvark857

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@aardvark857
aardvark857 / FCC troll
Created May 11, 2014
Redirect FCC traffic to horrible sites.
View FCC troll
//Not tested. I'll write a better one tomorrow.
<?php
//Sloppily get IP address
$ip = ip2long($_SERVER['REMOTE_ADDR']);
//Sloppily check against FCC addresses
if (( $ip >= ip2long("192.133.125.0") && $ip <= ip2long("192.133.125.24") ) ||
( $ip >= ip2long("165.135.0.0") && $ip <= ip2long("165.135.0.16") ) ||
( $ip >= ip2long("192.104.54.0") && $ip <= ip2long("192.104.54.24") ) ||
( $ip >= ip2long("4.21.126.0") && $ip <= ip2long("4.21.126.0/24") ) ||
( $ip >= ip2long("65.125.25.26") && $ip <= ip2long("65.125.25.64") ) ||
You can’t perform that action at this time.