Important: Valar Solutions scam - Have you been also scammed by Valar Solutions? - Please click [here] to read more! - Valar Solutions fraud
Snapchat Contest #1 Free Snapchat bot access for you! Please click [here] to read more! (Last update: 8th of January 2020)
January 2020 news -  CPAElites Essentials (2020) is coming: Please click [here] to read more!


PHP Script to Block Bad Traffic - Proxy/Bot/VPN/TOR
2016-07-17, 11:17 AM,
#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
2016-07-17, 12:11 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, 12:22 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, 12:27 PM, (This post was last modified: 2016-07-17, 12:28 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, 10:05 AM,
#5
thanks so much for effort
Reply
2017-07-27, 08:18 AM,
#6
Thanks mate for the script. :)
Reply
2017-07-28, 07:31 AM,
#7
Thank you for the script buddy! Smile
Reply
2017-07-28, 03:10 PM,
#8
Thank you mate for the script
Reply
2017-07-30, 03:29 AM,
#9
Great thanks you for share, this script.
Reply
2018-10-16, 06:47 AM,
#10
thankssssssssssssssss
Reply


Related Threads
Thread Author Replies Views Last Post
  [VIRAL] CPA Method + Script FederalBureau 51 9,162 2020-02-20, 05:42 PM
Last Post: medamazal
  [HUGE COLLECTION] 700 Php Websites and Scripts [NEW] VirtualBand 114 28,046 2020-02-13, 12:49 PM
Last Post: skyfinity
  [FRESH] [METHOD] FREE Private Dedicated IP Proxy [UNMETERED] [HOT] HexaTech 251 35,098 2020-02-13, 12:11 PM
Last Post: shridi
  Omegle bot 1.4.3 [Free download] Haye 69 53,982 2020-01-15, 12:14 PM
Last Post: CharlieHarper
  [FREE/SCRIPT] PHP Geo/Country Redirect - Powerful Script! Restricted7 20 6,530 2020-01-13, 06:26 AM
Last Post: efendingk





About Us | Contact Us | CPAElites | Advertise | Stats

Copyright © 2013 - 2019 by (company to be announced later)
Temporarily (!) powered by MyBB, fixed (repaired) and enhanced by Charlie Harper (GitHub) aka Charles Francis Harper (Wikipedia)
Return to top
This forum uses Lukasz Tkacz MyBB addons.