Bitcoin Forum

Economy => Micro Earnings => Topic started by: BitBustah on January 15, 2017, 03:17:45 PM



Title: IP checking service for faucet owners
Post by: BitBustah on 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.


Title: Re: IP checking service for faucet owners
Post by: Racey on January 15, 2017, 09:44:33 PM
Should be https://iphub.info/  ;D how are you, any new projects yet.


Title: Re: IP checking service for faucet owners
Post by: felicita on 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


Title: Re: IP checking service for faucet owners
Post by: BitBustah on January 16, 2017, 07:11:39 AM
Should be https://iphub.info/  ;D 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.


Title: Re: IP checking service for faucet owners
Post by: xnd on June 11, 2017, 02:00:56 PM
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/


Title: Re: IP checking service for faucet owners
Post by: AdolfinWolf on June 11, 2017, 05:40:19 PM
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?


Title: Re: IP checking service for faucet owners
Post by: felicita on 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 :D


kind regards


Title: Re: IP checking service for faucet owners
Post by: BitBustah on June 13, 2017, 04:39:48 AM
hope they have a good list of bad ips :D


They have. :)


Title: Re: IP checking service for faucet owners
Post by: RektCoins on June 16, 2017, 08:38:28 AM
Also, how i can whitelist some IPs?

BTW it's working great.


Title: Re: IP checking service for faucet owners
Post by: Quimby88 on 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.


Title: Re: IP checking service for faucet owners
Post by: mocacinno on 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

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



Title: Re: IP checking service for faucet owners
Post by: tungaqhd on 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

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 :D


Title: Re: IP checking service for faucet owners
Post by: RektCoins on 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

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:

  <?php
      $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  :-\


Title: Re: IP checking service for faucet owners
Post by: mocacinno on June 16, 2017, 11:05:47 AM

I'm currently using this code

Code:

  <?php
      $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  :-\

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.


Title: Re: IP checking service for faucet owners
Post by: tungaqhd on 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

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:

  <?php
      $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  :-\
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


Title: Re: IP checking service for faucet owners
Post by: BitBustah on 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...


Title: Re: IP checking service for faucet owners
Post by: BitcoinzB on 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 :D


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.


Title: Re: IP checking service for faucet owners
Post by: cz3kit on 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 :)


Title: Re: IP checking service for faucet owners
Post by: bitcoinblog on 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 ?


Title: Re: IP checking service for faucet owners
Post by: BitBustah on 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.