Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function IsProxy($IP)
- {
- $Result = FALSE;//Innocent until proven Guilty
- $BlackList = array( 'http.dnsbl.sorbs.net',
- 'misc.dnsbl.sorbs.net',
- 'socks.dnsbl.sorbs.net',
- 'proxies.blackholes.easynet.nl',
- 'list.dsbl.org'
- );
- if (preg_match("/([0-9]+).([0-9]+).([0-9]+).([0-9]+)/", $IP, $Matches))
- {
- foreach ($BlackList as $Server)
- {
- echo $Server;
- $ServerHost = $Matches[4] . "." . $Matches[3] . "." . $Matches[2] . "." . $Matches[1] . "." . $Server;
- $Resolved = gethostbyname($ServerHost);
- if ($Resolved != $ServerHost)
- {
- $Result = TRUE;//GUILTY!
- break;
- }
- }
- }
- return $Result;
- }
Advertisement
Add Comment
Please, Sign In to add comment