Pages:
Author

Topic: FaucetBOX.com Discussion - page 50. (Read 237001 times)

full member
Activity: 197
Merit: 100
March 24, 2016, 02:55:43 PM
Quote
Notice: Trying to get property of non-object in /home/lyqan/public_html/index.php on line 2219

Fatal error: Unsupported operand types in /home/lyqan/public_html/index.php on line 2240

In my index.php code at line 2219

Code:
$countryCode = json_decode(file_get_contents('http://freegeoip.net/json/' . getIP()))->country_code;

& at line 2240

Code:
$rW *= $rewardMultiplier;

Thanks.

not that guy, but I would assume

a) freegeoip.net is not returning expected json

b) no idea, looks like $rW or $rewardMultiplier is of wrong type (NULL? array?)

for first problem you can debug like this:
Code:
echo "User's ip: ". getIP() . "\n";
echo "Raw JSON: ". file_get_contents('http://freegeoip.net/json/' . getIP()) . "\n";
echo "decoded JSON: ". var_dump( json_decode(file_get_contents('http://freegeoip.net/json/' . getIP())). "\n";

first line should show user's ip, second should show json (something like "{ ... country_code: "GB" ... }"), third line should show object.
sr. member
Activity: 588
Merit: 250
March 24, 2016, 02:33:28 PM
Thank you very much, and for example for that reward is see on the web? I mean that if someone comes from a country you see the reward that will win
Oops, I forgot about that. In order to have it display them properly you would need to move some things around, but it still isn't that difficult.

So, at line 2218 on your index.php we're going to get the user's country and such. Put this code there:
Code:
//This code determines the reward
$countryCode = json_decode(file_get_contents('http://freegeoip.net/json/' . getIP()))->country_code;

$rewardMultiplier = 1;

if($countryCode == 'GB'){
$rewardMultiplier = 1.1;
}
Rather than times everything individually, we're going to create a multiplier variable to times everything by.
Also, I noticed that I used 0.1 rather than 1.1 in my previous example. This would give 10% of the expected reward rather than 110%, so unless you want to decrease the reward the multiplier should always be greater than 1.

After this, at line 2232 (before if(count($rewards) > 1) {) add this code:
Code:
foreach($rewards as $rW){
$rW *= $rewardMultiplier;
$newRewards[] = $rW;
}
$rewards = $newRewards;
If I am right this will get every reward from the array and times it by the multiplier (therefore 1.1 (110%) if the user is in GB). I would appreciate if someone else could check this first before anyone puts it into any live code though, since I am prone to making mistakes when coding directly into BitcoinTalk.
 
After this, be sure to revert the changes at line 2310 to this:
Code:
} else {
$ret = $fb->send($address, $reward);
}
Else the user will get the amount multiplied by more than you want, costing you money.

My apologies for not getting the code right the first time, I hope it didn't cause you any issues.

Hi Sir i tried this code & get following errors if you please take a look at them and modify the code.

Quote
Notice: Trying to get property of non-object in /home/lyqan/public_html/index.php on line 2219

Fatal error: Unsupported operand types in /home/lyqan/public_html/index.php on line 2240

In my index.php code at line 2219

Code:
$countryCode = json_decode(file_get_contents('http://freegeoip.net/json/' . getIP()))->country_code;

& at line 2240

Code:
$rW *= $rewardMultiplier;

Thanks.
legendary
Activity: 1274
Merit: 1000
March 17, 2016, 06:45:52 AM

I just checked my recaptcha admin page and I didn't see anything new.

Did the code look like this?



I'm not sure if I missed something, but I checked and recaptcha only displayed a private key, not a public one. (I'm still using my old public key though) It's possible that I missed something, I'll go over it again.

Seems like you just had "Step 2: Server side integration" tab open instead of "Keys"
So you just need to click "Keys" under "Adding reCAPTCHA to your site" and you will see both keys.
legendary
Activity: 1064
Merit: 1000
March 17, 2016, 12:32:08 AM
Google has updated their captcha system, do we continue to use the old keys, or do we have to integrate anything new in the faucetbox script?

I am sure google will notify you if you must change your keys.
But what is the update about? I haven't heard about it yet.

I actually haven't read what the update does yet, but today I logged into my recaptcha account and instead of giving me a public key, it gave me some code. The old keys still work for now, but I'm wondering if faucetbox will update to accommodate this.

I just checked my recaptcha admin page and I didn't see anything new.

Did the code look like this?



I'm not sure if I missed something, but I checked and recaptcha only displayed a private key, not a public one. (I'm still using my old public key though) It's possible that I missed something, I'll go over it again.
hero member
Activity: 672
Merit: 500
March 15, 2016, 09:15:23 PM
It's not only whether the connection is reliable and fast or not. reCaptcha actually tries to guess the "riskiness" of handling current user. If for example (totally made up values, just to show the point) you solved one reCaptcha yesterday and haven't failed any in 3 days, then reCatpcha assumes you're good to go and won't show you images. However if in the past hour you've solved 10 captchas, then that's something unusual, so it'll show you these images with checkboxes to solve.

So it's more about what reCaptcha currently thinks about you.

I have sometimes solved over hundred reCaptchas in day without getting any of the slow connection/no js captchas.
Only thing I have noticed when they think I am suspicious (doing many captcahs) is that I need to solve the (normal) captcha 2-4 times correctly before they trust me. But I have never got no js captcha for that.

Also google says that it should only show when "your browser environment doesn't support the reCAPTCHA checkbox widget."



recapta is the bad captcha for me, i get some issue like you get.
i think better to use fun captcha service than use recaptcha.
hero member
Activity: 546
Merit: 500
March 15, 2016, 08:47:03 PM
I though that happen due slow internet connections. 

Btw I just tried it with dev tools using 50kbs speed.
Took 1 minutes 20 seconds to load the page but captcha worked normally.
It doesn't frequently appear even if I have unstable connection. Sometimes it appears when I open the site for the first time in a day. But when it appears, I just refresh the browser and then the recpatcha is normal again.
legendary
Activity: 1274
Merit: 1000
March 15, 2016, 04:41:43 PM
I though that happen due slow internet connections. 

Btw I just tried it with dev tools using 50kbs speed.
Took 1 minutes 20 seconds to load the page but captcha worked normally.
legendary
Activity: 1524
Merit: 1001
NOBT - WNOBT your saving bank◕◡◕
March 15, 2016, 04:37:44 PM
I though that happen due slow internet connections. 
legendary
Activity: 1274
Merit: 1000
March 15, 2016, 03:23:02 PM
But they still require you to select images. The "standard" mode of reCaptcha is that you just click "I'm a human" checkbox and that's all.

But we were talking about the captcha where "You have to put a tick/ checkmark in a little box then copy some code to make a claim."
And it should only show when browser environment doesn't support the reCAPTCHA checkbox widget.
legendary
Activity: 971
Merit: 1000
March 15, 2016, 02:52:41 PM
It's not only whether the connection is reliable and fast or not. reCaptcha actually tries to guess the "riskiness" of handling current user. If for example (totally made up values, just to show the point) you solved one reCaptcha yesterday and haven't failed any in 3 days, then reCatpcha assumes you're good to go and won't show you images. However if in the past hour you've solved 10 captchas, then that's something unusual, so it'll show you these images with checkboxes to solve.

So it's more about what reCaptcha currently thinks about you.

I have sometimes solved over hundred reCaptchas in day without getting any of the slow connection/no js captchas.
Only thing I have noticed when they think I am suspicious (doing many captcahs) is that I need to solve the (normal) captcha 2-4 times correctly before they trust me. But I have never got no js captcha for that.

Also google says that it should only show when "your browser environment doesn't support the reCAPTCHA checkbox widget."

But they still require you to select images. The "standard" mode of reCaptcha is that you just click "I'm a human" checkbox and that's all.
legendary
Activity: 1274
Merit: 1000
March 15, 2016, 01:25:07 PM
It's not only whether the connection is reliable and fast or not. reCaptcha actually tries to guess the "riskiness" of handling current user. If for example (totally made up values, just to show the point) you solved one reCaptcha yesterday and haven't failed any in 3 days, then reCatpcha assumes you're good to go and won't show you images. However if in the past hour you've solved 10 captchas, then that's something unusual, so it'll show you these images with checkboxes to solve.

So it's more about what reCaptcha currently thinks about you.

I have sometimes solved over hundred reCaptchas in day without getting any of the slow connection/no js captchas.
Only thing I have noticed when they think I am suspicious (doing many captcahs) is that I need to solve the (normal) captcha 2-4 times correctly before they trust me. But I have never got no js captcha for that.

Also google says that it should only show when "your browser environment doesn't support the reCAPTCHA checkbox widget."

legendary
Activity: 1134
Merit: 1000
Soon, I have to go away.
March 15, 2016, 11:59:58 AM
It's not only whether the connection is reliable and fast or not. reCaptcha actually tries to guess the "riskiness" of handling current user. If for example (totally made up values, just to show the point) you solved one reCaptcha yesterday and haven't failed any in 3 days, then reCatpcha assumes you're good to go and won't show you images. However if in the past hour you've solved 10 captchas, then that's something unusual, so it'll show you these images with checkboxes to solve.

So it's more about what reCaptcha currently thinks about you.

Well that is hilarious, thanks for that.
So they try things to make it a little tougher, like those impossible to read captchas.
I got the hang of those types now, as my eyesight has worsened I can see them better.
legendary
Activity: 971
Merit: 1000
March 15, 2016, 11:20:16 AM
It's not only whether the connection is reliable and fast or not. reCaptcha actually tries to guess the "riskiness" of handling current user. If for example (totally made up values, just to show the point) you solved one reCaptcha yesterday and haven't failed any in 3 days, then reCatpcha assumes you're good to go and won't show you images. However if in the past hour you've solved 10 captchas, then that's something unusual, so it'll show you these images with checkboxes to solve.

So it's more about what reCaptcha currently thinks about you.
hero member
Activity: 546
Merit: 500
March 15, 2016, 10:31:33 AM
I don't think its anything to do with slowdown, my connection at the moment is 98.12 Mb/s up   7.16 Mb/s down.
And it still happens, not your fault or mine, its them sites with the wrong version captcha on me thinks.

Checkboxes appear IF for some reason JavaScript does not work (ad blocker or other scammy plugin, unstable connection, buggy proxy etc.)

That is what I meant for the slow connection. I just can't translate it on my previous post, sorry.
Anyway, I'm from the country where the connection is slower than the dead slug  Grin, that's why I mostly experienced the captchas with tickboxes.
full member
Activity: 500
Merit: 100
March 15, 2016, 10:26:28 AM
I don't think its anything to do with slowdown, my connection at the moment is 98.12 Mb/s up   7.16 Mb/s down.
And it still happens, not your fault or mine, its them sites with the wrong version captcha on me thinks.

Checkboxes appear IF for some reason JavaScript (not JAVA) does not work.
Possible reasons:
 - ad blocker or other scammy plugin got wild (try private mode)
 - unstable connection (press F12 in your browser, go to "Network" tab and press CTRL+F5 to refresh. In the list you will see the reason why the js did not load)
 - buggy proxy etc. (same as above)
 - buggy browser cache (try clearing your image cache)
legendary
Activity: 1134
Merit: 1000
Soon, I have to go away.
March 15, 2016, 07:40:18 AM
I don't think its anything to do with slowdown, my connection at the moment is 98.12 Mb/s up   7.16 Mb/s down.
And it still happens, not your fault or mine, its them sites with the wrong version captcha on me thinks.
hero member
Activity: 546
Merit: 500
March 15, 2016, 07:02:24 AM
Usually that recaptcha is appearing even in known faucets whenever I have slow internet connections. I think that type of recaptcha is designed for slow network connections.

EDIT: Even the funcaptcha have that design.

How can funcaptcha have design like that? With check boxes?
I have never seen that, how does it work?
This funcaptcha for example:

Whenever my connection slows down, tha images have tickboxes on the lower right corner just like recaptcha.
It also works like recaptcha, after ticking the right images a long codes will appear and you have to to copy and paste the code on the box below it.
legendary
Activity: 1134
Merit: 1000
Soon, I have to go away.
March 15, 2016, 06:52:50 AM

You have to put a tick/ checkmark in a little box then copy some code to make a claim.


These should be shown only if java script isn't supported by your browser etc.

I don't get this all the time, just on occasion they pop up.

My Java is active and enabled, I wonder what else it could be, its not on my end I dont think.

Edit to add:

This Doge faucet has that captcha https://www.smexycoin.pw/dogecoin/


I checked that site you linked and I got normal captcha.
Next time you see that click "Want an easier challenge" link to see all possible reasons why you may see that.

I just revisited the website, different captcha( normal) but Insufficient funds  Cheesy
hero member
Activity: 714
Merit: 500
March 15, 2016, 06:12:34 AM
Usually that recaptcha is appearing even in known faucets whenever I have slow internet connections. I think that type of recaptcha is designed for slow network connections.

EDIT: Even the funcaptcha have that design.

How can funcaptcha have design like that? With check boxes?
I have never seen that, how does it work?
hero member
Activity: 546
Merit: 500
March 15, 2016, 05:02:52 AM

You have to put a tick/ checkmark in a little box then copy some code to make a claim.


These should be shown only if java script isn't supported by your browser etc.

I don't get this all the time, just on occasion they pop up.

My Java is active and enabled, I wonder what else it could be, its not on my end I dont think.

Edit to add:

This Doge faucet has that captcha https://www.smexycoin.pw/dogecoin/


Usually that recaptcha is appearing even in known faucets whenever I have slow internet connections. I think that type of recaptcha is designed for slow network connections.

EDIT: Even the funcaptcha have that design.
Pages:
Jump to: