Created
March 12, 2013 04:12
-
-
Save stwalkerster/5140290 to your computer and use it in GitHub Desktop.
block test script - takes an array of IPs and spits the lcally blocked ones back at you.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
ini_set("user_agent", "stw-block-script/1.0 ( User:Stwalkerster )"); | |
$iplist = array( "127.0.0.1" ); | |
header("Content-Type: text/plain"); | |
foreach($iplist as $ip){ | |
$data = (unserialize(file_get_contents("http://en.wikipedia.org/w/api.php?action=query&list=blocks&format=php&bkusers=$ip"))); | |
if( count( $data["query"]["blocks"]) != 0 ) | |
echo $ip . "\n"; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment