PHP Script to Block Bad Traffic - Proxy/Bot/VPN/TOR
2016-07-17, 02:47 PM,
#1
I saw a publisher get banned by his CPA network because his traffic contain bad traffic. I felt that he is innocent because we are unable to fully control the traffic. Thus, I search around internet and found a PHP Script that are able to block most of these bad traffic.

[hide]
Put the Php script at your Landing Page between <head> </head>
More Info: http://check.getipintel.net/

PHP Code:
<?php
if(@fsockopen($_SERVER['REMOTE_ADDR'], 80$errstr$errno1))
die(
"It would apprear you're using a proxy/Bot/VPN/TOR, so please, go fuck yourself!");

function 
checkProxy($ip){
        
$contactEmail="YOUREMAIL";
        
$timeout=3
        
$banOnProability=0.99;
        
        
$ch curl_init();
        
curl_setopt($chCURLOPT_RETURNTRANSFER1);
        
curl_setopt($chCURLOPT_TIMEOUT$timeout);
        
curl_setopt($chCURLOPT_URL"http://check.getipintel.net/check.php?ip=$ip");
        
$response=curl_exec($ch);
        
        
curl_close($ch);
        
        
        if (
$response $banOnProability) {
                return 
true;
        } else {
            if (
$response || strcmp($response"") == ) {
                
//The server returned an error, you might want to do something
                //like write to a log file or email yourself
                //This could be true due to an invalid input or you've exceeded
                //the number of allowed queries. Figure out why this is happening
                //because you aren't protected by the system anymore
                //Leaving this section blank is dangerous because you assume
                //that you're still protected, which is incorrect
                //and you might think GetIPIntel isn't accurate anymore
                //which is also incorrect.
                //failure to implement error handling is bad for the both of us
            
}
                return 
false;
        }
}
$ip=$_SERVER['REMOTE_ADDR'];
if (
checkProxy($ip)) {
    echo 
"It would apprear you're using a proxy/Bot/VPN/TOR, so please, go fuck yourself! <br />";
}
?>


[/hide]

[Image: HDltYfu.gif]
Reply
Share This Thread :

2016-07-17, 03:41 PM,
#2
isn't it that we need to put also our email in this format http://check.getipintel.net/check.php?ip...ddressHere

I see in the script that $contactEmail="YOUREMAIL"; but is never used in the function
Reply
2016-07-17, 03:52 PM,
#3
" It would apprear you're using a proxy/Bot/VPN/TOR, so please, go fuck yourself! " - reporting you for abusive language!


Kidding Smile
Reply
2016-07-17, 03:57 PM, (This post was last modified: 2016-07-17, 03:58 PM by victor.)
#4
or just put this in your htaccess

Code:
RewriteCond %{HTTP:VIA} !^$ [OR]
RewriteCond %{HTTP:FORWARDED} !^$ [OR]
RewriteCond %{HTTP:USERAGENT_VIA} !^$ [OR]
RewriteCond %{HTTP:X_FORWARDED_FOR} !^$ [OR]
RewriteCond %{HTTP:PROXY_CONNECTION} !^$ [OR]
RewriteCond %{HTTP:XPROXY_CONNECTION} !^$ [OR]
RewriteCond %{HTTP:HTTP_PC_REMOTE_ADDR} !^$ [OR]
RewriteCond %{HTTP:HTTP_CLIENT_IP} !^$
RewriteRule ^(.*)$ – [F]

then a php fucntion to detect the bot

PHP Code:
<?php if(@fsockopen($_SERVER['REMOTE_ADDR'], 80$errstr$errno1))
die(
"Proxy access not allowed"); 
Reply
2017-07-25, 01:35 PM,
#5
thanks so much for effort
Reply
2017-07-27, 11:48 AM,
#6
Thanks mate for the script. :)
Reply
2017-07-28, 11:01 AM,
#7
Thank you for the script buddy! Smile
Reply
2017-07-28, 06:40 PM,
#8
Thank you mate for the script
Reply
2017-07-30, 06:59 AM,
#9
Great thanks you for share, this script.
Reply


Related Threads
Thread Author Replies Views Last Post
  [FRESH] [METHOD] FREE Private Dedicated IP Proxy [UNMETERED] [HOT] HexaTech 41 14,610 2018-07-17, 09:54 PM
Last Post: CPATracker
  [GET] HQ PHP Script - Watch Movies Online - GROF 63 20,887 2018-07-17, 04:41 PM
Last Post: ℛage
  [FREE] Cloak Script Watt 75 8,436 2018-07-17, 01:17 PM
Last Post: daddyoh
  Traffic Junky Advertising WarAffiliate 21 4,564 2018-07-02, 05:46 AM
Last Post: chandreshvshah
  [TEMPLATE] Online Generator With Force Like and Share Script and Connect to FB Twisted Fate 71 11,515 2018-06-27, 08:06 PM
Last Post: salen72





About Us | Contact Us | CPA Elites | Advertise | Stats

© 2013-2018 CPA Elites Ltd
Enhanced by MyBB and WallBB
Return to top