IPHub.info provides the same service as NastyHosts.com – it’s a Proxy/VPN detector. Basically, it checks if a certain IP is a residential, a proxy or belongs to a VPN provider.
Using such a service is crucial for a faucet site security. Most attackers use hundreds of IPs to abuse your faucet and make illegal claims from hundred of IP addresses belonging to VPN providers. So, you are most likely to pay the same user, hundreds of times, every few minutes. That’s just wrong and it shouldn’t be possible.
NastyHosts provides a pretty good service but it has its periods of time (days, actually) when the service is unavailable. It also returns a lot of false positives, meaning that many clean, good-faith users will also be blocked among those VPN/Proxy users.
This is when IPHub.info comes into play! It provides an awesome service, it’s uptime is basically 100% for months now and the best part is, it doesn’t confuse good-faith users from abusers.
However, you can use IPHub for free only for a maximum of 50 requests per minute.
If you need more than that, you should get a paid subscription – 10 € / month for up tp 10 requests / second.
How to implement IPHub on your bitcoin faucet site
First thing you need to do is create an account over at IPHub. Create one here.
After the registration is complete, you will receive an email containing your unique API key.
Next, you need to use a code snippet to check each visitor’s IP and see if it’s a normal user or a Proxy/VPN user.
Here’s an example snippet code: (Thanks to bitdesire.it !)
First, replace YOUR-UNIQUE-API-KEY with the api key you got in the mail from IPHub.
What does this script actually do?
- Checks if a visitor’s ip is clean or a Proxy/VPN
- If detected as Proxy/VPN, it writes the visitor’s IP to a file called blockedips.txt
- It redirects the abusive visitor to blocked.html page.
You need to create the blocked.html file in your webroot folder and add whatever message you want in it (like “Proxy/VPN access is not allowed” or whatever you want).
The tricky part is to integrate this code into your faucet script. You should probably save the snippet as iphub.php file, upload it to your webroot and add this code at the begging of your index.php file:
If you have any questions or need instructions to add this code to a certain faucet script, you can send me an email through the contact section of this page.