Author

Topic: IP checking service for faucet owners (Read 1153 times)

hero member
Activity: 1218
Merit: 534
March 30, 2018, 09:05:26 AM
#20
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.
sr. member
Activity: 501
Merit: 252
March 30, 2018, 07:45:07 AM
#19
Is the owner of Iphub.info still active on this board ?

From what time there database is not updated ?
sr. member
Activity: 378
Merit: 251
June 18, 2017, 04:38:52 AM
#18
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 Smiley
full member
Activity: 210
Merit: 100
💰💰💰💰
June 18, 2017, 03:18:50 AM
#17
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 Cheesy


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.
hero member
Activity: 1218
Merit: 534
June 16, 2017, 11:44:36 PM
#16
You should not use txt files. In the end, that file will become huge and will slow down your site...
hero member
Activity: 1540
Merit: 508
June 16, 2017, 06:07:39 AM
#15
Also, how i can whitelist some IPs?

BTW it's working great.

Adding to the sollution AdolfinWolf already provided in hist post above

Code:
 
$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

Code:

        $ip $_SERVER['REMOTE_ADDR'];
      
$handle fopen("blockedips.txt","a");
      
$ch curl_init();
      
curl_setopt($chCURLOPT_SSL_VERIFYPEERfalse);
      
curl_setopt($chCURLOPT_RETURNTRANSFERtrue);
      
curl_setopt($chCURLOPT_URL'http://v2.api.iphub.info/ip/'.$ip);
      
curl_setopt($chCURLOPT_HTTPHEADER, array('X-Key: YOUR-UNIQUE-API-KEY'));
      
$result curl_exec($ch);
      
curl_close($ch);
 
      
$obj json_decode($resulttrue);
      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  Undecided
for example if you have a whitelist ip, then:
Code:
$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
legendary
Activity: 3584
Merit: 5248
https://merel.mobi => buy facemasks with BTC/LTC
June 16, 2017, 06:05:47 AM
#14

I'm currently using this code

Code:

        $ip $_SERVER['REMOTE_ADDR'];
      
$handle fopen("blockedips.txt","a");
      
$ch curl_init();
      
curl_setopt($chCURLOPT_SSL_VERIFYPEERfalse);
      
curl_setopt($chCURLOPT_RETURNTRANSFERtrue);
      
curl_setopt($chCURLOPT_URL'http://v2.api.iphub.info/ip/'.$ip);
      
curl_setopt($chCURLOPT_HTTPHEADER, array('X-Key: YOUR-UNIQUE-API-KEY'));
      
$result curl_exec($ch);
      
curl_close($ch);
 
      
$obj json_decode($resulttrue);
      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  Undecided

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:
Code:
$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.
member
Activity: 110
Merit: 10
There's always an alternative. Rektcoins is back!
June 16, 2017, 06:00:32 AM
#13
Also, how i can whitelist some IPs?

BTW it's working great.

Adding to the sollution AdolfinWolf already provided in hist post above

Code:
 
$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

Code:

        $ip $_SERVER['REMOTE_ADDR'];
      
$handle fopen("blockedips.txt","a");
      
$ch curl_init();
      
curl_setopt($chCURLOPT_SSL_VERIFYPEERfalse);
      
curl_setopt($chCURLOPT_RETURNTRANSFERtrue);
      
curl_setopt($chCURLOPT_URL'http://v2.api.iphub.info/ip/'.$ip);
      
curl_setopt($chCURLOPT_HTTPHEADER, array('X-Key: YOUR-UNIQUE-API-KEY'));
      
$result curl_exec($ch);
      
curl_close($ch);
 
      
$obj json_decode($resulttrue);
      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  Undecided
hero member
Activity: 1540
Merit: 508
June 16, 2017, 04:14:11 AM
#12
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

Code:
 
$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 Cheesy
legendary
Activity: 3584
Merit: 5248
https://merel.mobi => buy facemasks with BTC/LTC
June 16, 2017, 03:43:03 AM
#11
Also, how i can whitelist some IPs?

BTW it's working great.

Adding to the sollution AdolfinWolf already provided in hist post above

Code:
 
$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 /";
}
}

sr. member
Activity: 486
Merit: 250
June 16, 2017, 03:40:34 AM
#10
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.
member
Activity: 110
Merit: 10
There's always an alternative. Rektcoins is back!
June 16, 2017, 03:38:28 AM
#9
Also, how i can whitelist some IPs?

BTW it's working great.
hero member
Activity: 1218
Merit: 534
June 12, 2017, 11:39:48 PM
#8
hope they have a good list of bad ips Cheesy


They have. Smiley
legendary
Activity: 1582
Merit: 1031
June 12, 2017, 02:26:33 PM
#7
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 Cheesy


kind regards
legendary
Activity: 1946
Merit: 1427
June 11, 2017, 12:40:19 PM
#6
Here's a post about IPHub.info and an example code to integrate it in your faucet script:

http://coinadia.com/iphub-info-nastyhosts-alternative-block-proxys-vpns/

Or simply add this if your site is using php, and put it preferably into the index.php. Should work aswell.
Code: (https://docs.iphub.info/documentation/php-integration/)
 

$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      
Code:
     http://iphub.info/api.php?ip=                                  
with


Code:
http://legacy.iphub.info/api.php?
xnd
sr. member
Activity: 297
Merit: 250
@DEVRAWL
June 11, 2017, 09:00:56 AM
#5
Here's a post about IPHub.info and an example code to integrate it in your faucet script:

http://coinadia.com/iphub-info-nastyhosts-alternative-block-proxys-vpns/
hero member
Activity: 1218
Merit: 534
January 16, 2017, 02:11:39 AM
#4
Should be https://iphub.info/  Grin how are you, any new projects yet.

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.
legendary
Activity: 1582
Merit: 1031
January 15, 2017, 04:49:25 PM
#3
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
legendary
Activity: 1134
Merit: 1000
Soon, I have to go away.
January 15, 2017, 04:44:33 PM
#2
Should be https://iphub.info/  Grin how are you, any new projects yet.
hero member
Activity: 1218
Merit: 534
January 15, 2017, 10:17:45 AM
#1
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.
Jump to: