BitBustah (OP)
|
|
January 15, 2017, 03:17:45 PM |
|
Back in the day when I owned BitBlabber I used www.IPHub.info as an IP checking service. It's a free service. It gave me very few false positives and I thought it performed better than NastyHosts. Check it out. If you use it, be sure to read the sites rules. The owner is a cool guy, he'll answer all your questions.
|
|
|
|
Racey
Legendary
Offline
Activity: 1134
Merit: 1000
Soon, I have to go away.
|
|
January 15, 2017, 09:44:33 PM |
|
Should be https://iphub.info/ how are you, any new projects yet.
|
And its gone.
|
|
|
felicita
Legendary
Offline
Activity: 1582
Merit: 1031
|
|
January 15, 2017, 09:49:25 PM |
|
Back in the day when I owned BitBlabber I used www.IPHub.info as an IP checking service. It's a free service. It gave me very few false positives and I thought it performed better than NastyHosts. Check it out. If you use it, be sure to read the sites rules. The owner is a cool guy, he'll answer all your questions. can you give a curl example or even php example how to use there api ? iam not really understand there api and some help. kind regards
|
|
|
|
BitBustah (OP)
|
|
January 16, 2017, 07:11:39 AM |
|
No I'm done. Thanks for sharing the link, it was late last night. Back in the day when I owned BitBlabber I used www.IPHub.info as an IP checking service. It's a free service. It gave me very few false positives and I thought it performed better than NastyHosts. Check it out. If you use it, be sure to read the sites rules. The owner is a cool guy, he'll answer all your questions. can you give a curl example or even php example how to use there api ? iam not really understand there api and some help. kind regards No sorry I can not. You need to find a programmer.
|
|
|
|
|
AdolfinWolf
Legendary
Offline
Activity: 1946
Merit: 1427
|
|
June 11, 2017, 05:40:19 PM Last edit: May 06, 2018, 06:57:24 PM by AdolfinWolf |
|
Or simply add this if your site is using php, and put it preferably into the index.php. Should work aswell.
$homepage = file_get_contents('http://iphub.info/api.php?ip='.$_SERVER['REMOTE_ADDR'].'&showtype=4'); $vpn = json_decode($homepage, true);
if($vpn['proxy'] == '1') { echo "We do not accept vpns/proxies to view our ads and claim from our site. Please contact us on X_X if you believe this was done in error. Thanks. / anything could be here /"; }
https://proxycheck.io/examples/I see they went to V2 or something which means you need to edit http://iphub.info/api.php?ip= with http://legacy.iphub.info/api.php?
|
|
|
|
felicita
Legendary
Offline
Activity: 1582
Merit: 1031
|
|
June 12, 2017, 07:26:33 PM |
|
wow really thank you for this help and thank to bitdesire.it now i implementet also iphub to my faucet script . hope they have a good list of bad ips kind regards
|
|
|
|
BitBustah (OP)
|
|
June 13, 2017, 04:39:48 AM |
|
hope they have a good list of bad ips They have.
|
|
|
|
RektCoins
Member
Offline
Activity: 110
Merit: 10
There's always an alternative. Rektcoins is back!
|
|
June 16, 2017, 08:38:28 AM |
|
Also, how i can whitelist some IPs?
BTW it's working great.
|
|
|
|
Quimby88
|
|
June 16, 2017, 08:40:34 AM |
|
The problem is that this script will also block a-ads bots so they are not able to check your code on your website so they will stop paying you.
|
|
|
|
mocacinno
Legendary
Offline
Activity: 3444
Merit: 5040
https://merel.mobi => buy facemasks with BTC/LTC
|
|
June 16, 2017, 08:43:03 AM |
|
Also, how i can whitelist some IPs?
BTW it's working great.
Adding to the sollution AdolfinWolf already provided in hist post above $whitelist = array('17.17.0.37, '128.17.5.33'); if (!in_array($_SERVER['REMOTE_ADDR'], $whitelist)) { $homepage = file_get_contents('http://iphub.info/api.php?ip='.$_SERVER['REMOTE_ADDR'].'&showtype=4'); $vpn = json_decode($homepage, true);
if($vpn['proxy'] == '1') { echo "We do not accept vpns/proxies to view our ads and claim from our site. Please contact us on X_X if you believe this was done in error. Thanks. / anything could be here /"; } }
|
|
|
|
tungaqhd
|
|
June 16, 2017, 09:14:11 AM |
|
The problem is that this script will also block a-ads bots so they are not able to check your code on your website so they will stop paying you.
I think we should use the code on claim page only instead of full page, so the bot will find the code or set the url of ads to a blank page without anti proxy. Also, how i can whitelist some IPs?
BTW it's working great.
Adding to the sollution AdolfinWolf already provided in hist post above $whitelist = array('17.17.0.37, '128.17.5.33'); if (!in_array($_SERVER['REMOTE_ADDR'], $whitelist)) { $homepage = file_get_contents('http://iphub.info/api.php?ip='.$_SERVER['REMOTE_ADDR'].'&showtype=4'); $vpn = json_decode($homepage, true);
if($vpn['proxy'] == '1') { echo "We do not accept vpns/proxies to view our ads and claim from our site. Please contact us on X_X if you believe this was done in error. Thanks. / anything could be here /"; } }
Nice, thank you so much
|
|
|
|
RektCoins
Member
Offline
Activity: 110
Merit: 10
There's always an alternative. Rektcoins is back!
|
|
June 16, 2017, 11:00:32 AM |
|
Also, how i can whitelist some IPs?
BTW it's working great.
Adding to the sollution AdolfinWolf already provided in hist post above $whitelist = array('17.17.0.37, '128.17.5.33'); if (!in_array($_SERVER['REMOTE_ADDR'], $whitelist)) { $homepage = file_get_contents('http://iphub.info/api.php?ip='.$_SERVER['REMOTE_ADDR'].'&showtype=4'); $vpn = json_decode($homepage, true);
if($vpn['proxy'] == '1') { echo "We do not accept vpns/proxies to view our ads and claim from our site. Please contact us on X_X if you believe this was done in error. Thanks. / anything could be here /"; } }
I'm currently using this code <?php $ip = $_SERVER['REMOTE_ADDR']; $handle = fopen("blockedips.txt","a"); $ch = curl_init(); curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); curl_setopt($ch, CURLOPT_URL, 'http://v2.api.iphub.info/ip/'.$ip); curl_setopt($ch, CURLOPT_HTTPHEADER, array('X-Key: YOUR-UNIQUE-API-KEY')); $result = curl_exec($ch); curl_close($ch); $obj = json_decode($result, true); if($obj['block'] == '1'){ fwrite($handle, "". $ip . "\n"); fclose($handle); header( "Location: blocked.html" ); die; } ?>
But i don't know how to whitelist IP's if some legit users get banned
|
|
|
|
mocacinno
Legendary
Offline
Activity: 3444
Merit: 5040
https://merel.mobi => buy facemasks with BTC/LTC
|
|
June 16, 2017, 11:05:47 AM |
|
I'm currently using this code <?php $ip = $_SERVER['REMOTE_ADDR']; $handle = fopen("blockedips.txt","a"); $ch = curl_init(); curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); curl_setopt($ch, CURLOPT_URL, 'http://v2.api.iphub.info/ip/'.$ip); curl_setopt($ch, CURLOPT_HTTPHEADER, array('X-Key: YOUR-UNIQUE-API-KEY')); $result = curl_exec($ch); curl_close($ch); $obj = json_decode($result, true); if($obj['block'] == '1'){ fwrite($handle, "". $ip . "\n"); fclose($handle); header( "Location: blocked.html" ); die; } ?>
But i don't know how to whitelist IP's if some legit users get banned At this moment, you open a filehandle, you check iphub.info and if an ip is blocked by iphub.info, you write this ip to your blockedips.txt file. The only purpose for this action would be to check who couldn't visit your site due to iphub.info's service. You can just implement my little if-clause around this block: $whitelist = array('17.17.0.37, '128.17.5.33'); if (!in_array($_SERVER['REMOTE_ADDR'], $whitelist)) { //your script }
you can get the array of whitelisted ip's from a filehandle, hardcoded (like in the example) or from your database... It doesn't really matter. If you put this if-clause around your code, anybody with a whitelisted ip will just bypass your test, even if they are blocked by iphub.info.
|
|
|
|
tungaqhd
|
|
June 16, 2017, 11:07:39 AM |
|
Also, how i can whitelist some IPs?
BTW it's working great.
Adding to the sollution AdolfinWolf already provided in hist post above $whitelist = array('17.17.0.37, '128.17.5.33'); if (!in_array($_SERVER['REMOTE_ADDR'], $whitelist)) { $homepage = file_get_contents('http://iphub.info/api.php?ip='.$_SERVER['REMOTE_ADDR'].'&showtype=4'); $vpn = json_decode($homepage, true);
if($vpn['proxy'] == '1') { echo "We do not accept vpns/proxies to view our ads and claim from our site. Please contact us on X_X if you believe this was done in error. Thanks. / anything could be here /"; } }
I'm currently using this code <?php $ip = $_SERVER['REMOTE_ADDR']; $handle = fopen("blockedips.txt","a"); $ch = curl_init(); curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); curl_setopt($ch, CURLOPT_URL, 'http://v2.api.iphub.info/ip/'.$ip); curl_setopt($ch, CURLOPT_HTTPHEADER, array('X-Key: YOUR-UNIQUE-API-KEY')); $result = curl_exec($ch); curl_close($ch); $obj = json_decode($result, true); if($obj['block'] == '1'){ fwrite($handle, "". $ip . "\n"); fclose($handle); header( "Location: blocked.html" ); die; } ?>
But i don't know how to whitelist IP's if some legit users get banned for example if you have a whitelist ip, then: $check = mysqli->query("SELECT ip FROM iplist WHERE ip = '$ip' "); $checkk = $check->num_rows; if ($checkk !== 1) { ....... your code here
check the sql syntax bcz i am not good
|
|
|
|
BitBustah (OP)
|
|
June 17, 2017, 04:44:36 AM |
|
You should not use txt files. In the end, that file will become huge and will slow down your site...
|
|
|
|
BitcoinzB
Full Member
Offline
Activity: 210
Merit: 100
💰💰💰💰
|
|
June 18, 2017, 08:18:50 AM |
|
wow really thank you for this help and thank to bitdesire.it now i implementet also iphub to my faucet script . hope they have a good list of bad ips kind regards You're welcome! Glad to see my example code was featured on coinadia too :p The problem is that this script will also block a-ads bots so they are not able to check your code on your website so they will stop paying you.
That's why you should check for bad IPs/proxies/TOR etc on claim or cashout and not block anyone from accessing your website straight away.
|
|
|
|
cz3kit
|
|
June 18, 2017, 09:38:52 AM |
|
Nice to see this. I actually had been searching for service like that. I will have a look into and see how it works. Thanks for sharing
|
|
|
|
bitcoinblog
|
|
March 30, 2018, 12:45:07 PM |
|
Is the owner of Iphub.info still active on this board ?
From what time there database is not updated ?
|
** FREE SPACE **
|
|
|
BitBustah (OP)
|
|
March 30, 2018, 02:05:26 PM |
|
Is the owner of Iphub.info still active on this board ?
From what time there database is not updated ?
Not sure if he is active here. Got a mail from him a few weeks ago. He's working hard for his site. Send him a mail if you have questions, he's a friendly guy.
|
|
|
|
|