Hi, I think that owners of faucets that are one of the things that do not hurt are the use of proxies, as yesterday looking for and looking for found this site that helps us quite the truth.
http://getipintel.net/It is insert this code at the top of the index.php of the template we are using.
Where $contactEmail="
Your mail";
Then where
web.html is a text file that is made with Notepad and we put inside for example (It appears you're a Proxy / VPN / bad IP, please contact [
Your mail] for more information) and we got it to the main directory where you will find the config.php.
This is what makes redirect proxies to web.html visits
Sorry the code is incomplete, go to githubhttps://github.com/blackdotsh/getIPIntel/*
* A PHP function that interacts with http://getIPIntel.net to look up an IP address
* returns TRUE if the IP returns a value greater than $banOnProability,
* FALSE otherwise, including errors
* HTTP error codes are NOT explicitly implemented here
* This should be used as a guide, be sure to edit and test it before using it in production
* MIT License
*/
//function requires curl
function checkProxy($ip){
$contactEmail="Your mail";
$timeout=3; //by default, wait no longer than 3 secs for a response
$banOnProability=0.99; //if getIPIntel returns a value higher than this, function returns true, set to 0.99 by default
//init and set cURL options
$ch = curl_init();
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_TIMEOUT, $timeout);
//if you're using custom flags (like flags=m), change the URL below
curl_setopt($ch, CURLOPT_URL, "http[Suspicious link removed]c($ch);
curl_close($ch);
if ($response > $banOnProability) {
return true;
} else {
if ($response < 0 || strcmp($response, "") == 0 ) {
//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
}
return false;
}
}
$ip=$_SERVER['REMOTE_ADDR'];
if (checkProxy($ip)) {
/* A proxy has been detected based on your criteria
* Do whatever you want to here
*/
echo 'Refresh" Content="0; URL=web.html">';
exit;
}
?>
I am new to this scene so they will be welcomed the recommendations and suggestions, sorry for my language, I am Spanish.
########################################
########################################
Another way to block proxiesPut this in your .htaccess, remove RewriteEngine on in the event that already is in the .htaccess
RewriteEngine on
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 in the index.php of the template on
if(@fsockopen($_SERVER['REMOTE_ADDR'], 80, $errstr, $errno, 1))
die("Here a message, for example prohibited use proxies");
?>
Source
http://forum.youhosting.com/topic3516-block-proxy-server-customize-your-htaccess-and-php-code.html########################################
Friends I am new and I don't know much php only try to help us all, sorry for my mistakes.
By the way I sell advertising space on my website I would be helpful
https://bitcointalksearch.org/topic/m.12703029.