Bitcoin Forum
June 21, 2024, 08:42:42 AM *
News: Voting for pizza day contest
 
   Home   Help Search Login Register More  
Pages: « 1 ... 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 [63] 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 ... 156 »
  Print  
Author Topic: FaucetBOX.com Discussion  (Read 236941 times)
This is a self-moderated topic. If you do not want to be moderated by the person who started this topic, create a new topic.
hawkfx
Newbie
*
Offline Offline

Activity: 14
Merit: 0


View Profile
November 25, 2015, 01:41:07 PM
 #1241

It os good now, was down for 25-30min :p
newcoins1978
Sr. Member
****
Offline Offline

Activity: 406
Merit: 250


View Profile
November 25, 2015, 04:20:17 PM
 #1242

Am I the only one that has something positive to say about faucetbox?

I can see most of you walking into trouble but I've never had a problem with faucetbox so far.
A lot of the people here post for support on the problems they are having, that doesn't make a service or script bad. A great deal of these posts are about add-ons to the script.
I expect that a lot of the faucet owners here would agree that FaucetBox is a great service.

Alright, that makes sense. Thanks for clearing that up for me.
altcoinlinks2
Member
**
Offline Offline

Activity: 60
Merit: 10


View Profile
November 25, 2015, 06:28:40 PM
 #1243

Hello can someone help me please

Im using Godaddy web hosting idk what im doing wrong i create a new database and user set password then go on file manager public html create new folder and upload extract and nothing

what am i missing or skipping?

<?php

$dbhost = "bob860";
$dbuser = "bob860";
$dbpass = "********";
$dbname = "bob860";
$display_errors = false;
$disable_admin_panel = false;

$connection_options = array(
    'disable_curl' => false,
    'local_cafile' => false,
    'force_ipv4' => false    // cURL only
);

// dsn - Data Source Name
// if you use MySQL, leave it as is
// more information:
// http://php.net/manual/en/pdo.construct.php
$dbdsn = "mysql:host=$dbhost;dbname=$dbname";
minifrij
Legendary
*
Offline Offline

Activity: 2324
Merit: 1267


In Memory of Zepher


View Profile WWW
November 25, 2015, 06:58:40 PM
 #1244

Hello can someone help me please

Im using Godaddy web hosting idk what im doing wrong i create a new database and user set password then go on file manager public html create new folder and upload extract and nothing

what am i missing or skipping?

snip
Do you get any sorts of errors?
altcoinlinks2
Member
**
Offline Offline

Activity: 60
Merit: 10


View Profile
November 25, 2015, 08:40:04 PM
 #1245

Hello can someone help me please

Im using Godaddy web hosting idk what im doing wrong i create a new database and user set password then go on file manager public html create new folder and upload extract and nothing

what am i missing or skipping?

snip
Do you get any sorts of errors?

Just the Coming soon im going to reset and start from scratch but if im doing anything wrong please let me know
ajun96
Hero Member
*****
Offline Offline

Activity: 658
Merit: 500



View Profile
November 25, 2015, 09:51:44 PM
 #1246

Hello can someone help me please

Im using Godaddy web hosting idk what im doing wrong i create a new database and user set password then go on file manager public html create new folder and upload extract and nothing

what am i missing or skipping?

<?php

$dbhost = "bob860";
$dbuser = "bob860";
$dbpass = "********";
$dbname = "bob860";
$display_errors = false;
$disable_admin_panel = false;

$connection_options = array(
    'disable_curl' => false,
    'local_cafile' => false,
    'force_ipv4' => false    // cURL only
);

// dsn - Data Source Name
// if you use MySQL, leave it as is
// more information:
// http://php.net/manual/en/pdo.construct.php
$dbdsn = "mysql:host=$dbhost;dbname=$dbname";

first you must make database on mydsatabase, dbname : bob860 bbuser: bob860
i think dbhost dont need change just localhost its no problem
altcoinlinks2
Member
**
Offline Offline

Activity: 60
Merit: 10


View Profile
November 26, 2015, 12:20:53 AM
 #1247

Hello can someone help me please

Im using Godaddy web hosting idk what im doing wrong i create a new database and user set password then go on file manager public html create new folder and upload extract and nothing

what am i missing or skipping?

<?php

$dbhost = "bob860";
$dbuser = "bob860";
$dbpass = "********";
$dbname = "bob860";
$display_errors = false;
$disable_admin_panel = false;

$connection_options = array(
    'disable_curl' => false,
    'local_cafile' => false,
    'force_ipv4' => false    // cURL only
);

// dsn - Data Source Name
// if you use MySQL, leave it as is
// more information:
// http://php.net/manual/en/pdo.construct.php
$dbdsn = "mysql:host=$dbhost;dbname=$dbname";

first you must make database on mydsatabase, dbname : bob860 bbuser: bob860
i think dbhost dont need change just localhost its no problem


hello thank you

i created a mydsatabase what do i use for dbhost in the php file?

also when uploading faucetbox files to godaddy do i create a new folder or extract copy paste straight to public html?
Dewi Aries
Legendary
*
Offline Offline

Activity: 2730
Merit: 1092


Leading Crypto Sports Betting & Casino Platform


View Profile
November 26, 2015, 12:25:25 AM
 #1248

Hello can someone help me please

Im using Godaddy web hosting idk what im doing wrong i create a new database and user set password then go on file manager public html create new folder and upload extract and nothing

what am i missing or skipping?

<?php

$dbhost = "bob860";
$dbuser = "bob860";
$dbpass = "********";
$dbname = "bob860";
$display_errors = false;
$disable_admin_panel = false;

$connection_options = array(
    'disable_curl' => false,
    'local_cafile' => false,
    'force_ipv4' => false    // cURL only
);

// dsn - Data Source Name
// if you use MySQL, leave it as is
// more information:
// http://php.net/manual/en/pdo.construct.php
$dbdsn = "mysql:host=$dbhost;dbname=$dbname";

you want to create a faucet?
Wow...nice...good luck

..Stake.com..   ▄████████████████████████████████████▄
   ██ ▄▄▄▄▄▄▄▄▄▄            ▄▄▄▄▄▄▄▄▄▄ ██  ▄████▄
   ██ ▀▀▀▀▀▀▀▀▀▀ ██████████ ▀▀▀▀▀▀▀▀▀▀ ██  ██████
   ██ ██████████ ██      ██ ██████████ ██   ▀██▀
   ██ ██      ██ ██████  ██ ██      ██ ██    ██
   ██ ██████  ██ █████  ███ ██████  ██ ████▄ ██
   ██ █████  ███ ████  ████ █████  ███ ████████
   ██ ████  ████ ██████████ ████  ████ ████▀
   ██ ██████████ ▄▄▄▄▄▄▄▄▄▄ ██████████ ██
   ██            ▀▀▀▀▀▀▀▀▀▀            ██ 
   ▀█████████▀ ▄████████████▄ ▀█████████▀
  ▄▄▄▄▄▄▄▄▄▄▄▄███  ██  ██  ███▄▄▄▄▄▄▄▄▄▄▄▄
 ██████████████████████████████████████████
▄▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▄
█  ▄▀▄             █▀▀█▀▄▄
█  █▀█             █  ▐  ▐▌
█       ▄██▄       █  ▌  █
█     ▄██████▄     █  ▌ ▐▌
█    ██████████    █ ▐  █
█   ▐██████████▌   █ ▐ ▐▌
█    ▀▀██████▀▀    █ ▌ █
█     ▄▄▄██▄▄▄     █ ▌▐▌
█                  █▐ █
█                  █▐▐▌
█                  █▐█
▀▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▀█
▄▄█████████▄▄
▄██▀▀▀▀█████▀▀▀▀██▄
▄█▀       ▐█▌       ▀█▄
██         ▐█▌         ██
████▄     ▄█████▄     ▄████
████████▄███████████▄████████
███▀    █████████████    ▀███
██       ███████████       ██
▀█▄       █████████       ▄█▀
▀█▄    ▄██▀▀▀▀▀▀▀██▄  ▄▄▄█▀
▀███████         ███████▀
▀█████▄       ▄█████▀
▀▀▀███▄▄▄███▀▀▀
..PLAY NOW..
altcoinlinks2
Member
**
Offline Offline

Activity: 60
Merit: 10


View Profile
November 26, 2015, 12:27:27 AM
 #1249

Hello can someone help me please

Im using Godaddy web hosting idk what im doing wrong i create a new database and user set password then go on file manager public html create new folder and upload extract and nothing

what am i missing or skipping?

<?php

$dbhost = "bob860";
$dbuser = "bob860";
$dbpass = "********";
$dbname = "bob860";
$display_errors = false;
$disable_admin_panel = false;

$connection_options = array(
    'disable_curl' => false,
    'local_cafile' => false,
    'force_ipv4' => false    // cURL only
);

// dsn - Data Source Name
// if you use MySQL, leave it as is
// more information:
// http://php.net/manual/en/pdo.construct.php
$dbdsn = "mysql:host=$dbhost;dbname=$dbname";

you want to create a faucet?
Wow...nice...good luck

its a school project not for profit just need to get it going
ajun96
Hero Member
*****
Offline Offline

Activity: 658
Merit: 500



View Profile
November 26, 2015, 01:16:57 AM
 #1250

Hello can someone help me please

Im using Godaddy web hosting idk what im doing wrong i create a new database and user set password then go on file manager public html create new folder and upload extract and nothing

what am i missing or skipping?

<?php

$dbhost = "bob860";
$dbuser = "bob860";
$dbpass = "********";
$dbname = "bob860";
$display_errors = false;
$disable_admin_panel = false;

$connection_options = array(
    'disable_curl' => false,
    'local_cafile' => false,
    'force_ipv4' => false    // cURL only
);

// dsn - Data Source Name
// if you use MySQL, leave it as is
// more information:
// http://php.net/manual/en/pdo.construct.php
$dbdsn = "mysql:host=$dbhost;dbname=$dbname";

first you must make database on mydsatabase, dbname : bob860 bbuser: bob860
i think dbhost dont need change just localhost its no problem


hello thank you

i created a mydsatabase what do i use for dbhost in the php file?

also when uploading faucetbox files to godaddy do i create a new folder or extract copy paste straight to public html?
just default in godady dhbhost, in config.php you just change dbuser,dbname, and dbpassword only that
yeah yo should upload on public html
lama-hunter
Sr. Member
****
Offline Offline

Activity: 266
Merit: 250



View Profile
November 26, 2015, 01:18:30 AM
 #1251

The last faucetbox Update was very helpful for users to grand only the best Profits.
After trying this now for several weeks it seems like that are site from the Spot 30 sometimes better than them on place 1.
Anyways its a good Way to do about 20k satoshi easily in 5 Minutes.

Thnakx you for the Service so far Wink
Keep it up

regards
lama-hunter
altcoinlinks2
Member
**
Offline Offline

Activity: 60
Merit: 10


View Profile
November 26, 2015, 09:02:00 AM
 #1252

Hello can someone help me please

Im using Godaddy web hosting idk what im doing wrong i create a new database and user set password then go on file manager public html create new folder and upload extract and nothing

what am i missing or skipping?

<?php

$dbhost = "bob860";
$dbuser = "bob860";
$dbpass = "********";
$dbname = "bob860";
$display_errors = false;
$disable_admin_panel = false;

$connection_options = array(
    'disable_curl' => false,
    'local_cafile' => false,
    'force_ipv4' => false    // cURL only
);

// dsn - Data Source Name
// if you use MySQL, leave it as is
// more information:
// http://php.net/manual/en/pdo.construct.php
$dbdsn = "mysql:host=$dbhost;dbname=$dbname";

first you must make database on mydsatabase, dbname : bob860 bbuser: bob860
i think dbhost dont need change just localhost its no problem


hello thank you

i created a mydsatabase what do i use for dbhost in the php file?

also when uploading faucetbox files to godaddy do i create a new folder or extract copy paste straight to public html?
just default in godady dhbhost, in config.php you just change dbuser,dbname, and dbpassword only that
yeah yo should upload on public html

what does that mean just default is it my site name?

should i reset and start from scratch?
Butord
Member
**
Offline Offline

Activity: 95
Merit: 10


View Profile
November 26, 2015, 12:46:06 PM
Last edit: November 26, 2015, 01:01:53 PM by Butord
 #1253

Hello can someone help me please

Im using Godaddy web hosting idk what im doing wrong i create a new database and user set password then go on file manager public html create new folder and upload extract and nothing

what am i missing or skipping?

<?php

$dbhost = "bob860";
$dbuser = "bob860";
$dbpass = "********";
$dbname = "bob860";
$display_errors = false;
$disable_admin_panel = false;

$connection_options = array(
    'disable_curl' => false,
    'local_cafile' => false,
    'force_ipv4' => false    // cURL only
);

// dsn - Data Source Name
// if you use MySQL, leave it as is
// more information:
// http://php.net/manual/en/pdo.construct.php
$dbdsn = "mysql:host=$dbhost;dbname=$dbname";

first you must make database on mydsatabase, dbname : bob860 bbuser: bob860
i think dbhost dont need change just localhost its no problem


hello thank you

i created a mydsatabase what do i use for dbhost in the php file?

also when uploading faucetbox files to godaddy do i create a new folder or extract copy paste straight to public html?
just default in godady dhbhost, in config.php you just change dbuser,dbname, and dbpassword only that
yeah yo should upload on public html

what does that mean just default is it my site name?

should i reset and start from scratch?

Try $dbhost = "localhost";
And no, you shouldn't start from scratch.
Or if it won't help try this
Quote
Here is how you find the server name at godaddy:

1. log in to hosting account (different from domain name account)
2. open control panel (link to the right of your
domain name)
3. click on databases
4. you should see a MySQL database there, if you
don't you need to create one for wordpress. Click on it.
5. click on the little pencil button near the right.
6. your server name is listed. Mine is p42mysql207.secureserver.net. You need all of it.
7. DO NOT click on "Open Manager" since the info
is not in there.
8. replace "localhost" with that server name
https://wordpress.org/support/topic/godaddy-1
It's about Wordpress but the problem the same
Hothza
Newbie
*
Offline Offline

Activity: 3
Merit: 0


View Profile
November 26, 2015, 06:10:47 PM
Last edit: November 26, 2015, 06:22:34 PM by Hothza
 #1254

Hello,
@Kazuldur: Do you have an API key which could be used for testing purposes of FaucetBox REST API?
I'm asking because I'm trying to test my Ruby on Rails code and API key shown on API page doesn't work for balance query (some headers omitted):

Code:
$curl -i -X POST -H "Content-Type:application/json" https://faucetbox.com/api/v1/balance?api_key=4VdBEIAQKPpZ4SWOhQLUMn7mMNVql

HTTP/1.1 200 OK
Date: Thu, 26 Nov 2015 17:46:57 GMT
Content-Type: text/html

{"status":403,"message":"Invalid API key."}

It would be great if that API key could be used for all request (balance, send, payouts) even if it would return some constant and fake data for correct parameters.


Kazuldur (OP)
Legendary
*
Offline Offline

Activity: 971
Merit: 1000


View Profile
November 26, 2015, 08:15:53 PM
 #1255

Hello,
@Kazuldur: Do you have an API key which could be used for testing purposes of FaucetBox REST API?
I'm asking because I'm trying to test my Ruby on Rails code and API key shown on API page doesn't work for balance query (some headers omitted):

Code:
$curl -i -X POST -H "Content-Type:application/json" https://faucetbox.com/api/v1/balance?api_key=4VdBEIAQKPpZ4SWOhQLUMn7mMNVql

HTTP/1.1 200 OK
Date: Thu, 26 Nov 2015 17:46:57 GMT
Content-Type: text/html

{"status":403,"message":"Invalid API key."}

It would be great if that API key could be used for all request (balance, send, payouts) even if it would return some constant and fake data for correct parameters.




You have to pass the API key as a POST parameter, not in query. Something like curl -d api_key=4VdBEIAQKPpZ4SWOhQLUMn7mMNVql -X POST https://faucetbox.com/api/v1/balance

Also, don't set the content type to json, as that's not true. Only response is in json, request should be application/x-www-form-urlencoded or similar, but you can just omit that.

Unless stated otherwise, all opinions are of my own, not FaucetBOX.com's.
Hothza
Newbie
*
Offline Offline

Activity: 3
Merit: 0


View Profile
November 26, 2015, 09:53:34 PM
 #1256

You have to pass the API key as a POST parameter, not in query. Something like curl -d api_key=4VdBEIAQKPpZ4SWOhQLUMn7mMNVql -X POST https://faucetbox.com/api/v1/balance

Also, don't set the content type to json, as that's not true. Only response is in json, request should be application/x-www-form-urlencoded or similar, but you can just omit that.

Ouch, you're right! Thanks!
toecutter
Hero Member
*****
Offline Offline

Activity: 622
Merit: 500


SatoshiGalaxy


View Profile WWW
November 27, 2015, 04:19:55 AM
Last edit: November 27, 2015, 04:40:05 AM by toecutter
 #1257

Hey Kazuldur, our people sent us this, saying your people might be interested:

http://www.satoshigalaxy.xyz/tmp/faucetbox.patch.txt



Here's a detailed explanation of what this patch does, in case it doesn't get accepted by FaucetBOX team, but you (faucet owner) still want to apply it.

NOTE: You should never trust third-party code unless you have complete understanding of what it does. I'll try my best to break down this patch and explain what it does, but if you're new to PHP it might be a good idea to avoid it.

The problem:

Sometimes, FaucetBOX takes too long to respond. Meanwhile, all PHP scripts executed by SAPI have a "max_execution_time" setting, mercilessly cutting execution off at some point.

So, for example, if you have this pseudo-code:

Code:
$fb = new FaucetBox(blah);
$fb->send(blah)
echo "OK, Sent some satoshi";

-- it's quite possible to arrive at situation when your "echo" IS NEVER executed, because "$fb->send()" took too much time.

Before we tackle this problem, we shall also allow faucetbox.php to report errors a little bit better and also handle some more regular errors.

Connection error patch:

Let's imagine a situation when faucetbox.com doesn't connect at all.

(To test such situation, change
Code:
-protected $api_base = "https://faucetbox.com/api/v1/";
+protected $api_base = "http://localhost:91234/";
where "91234" is an unused port on your machine.)

In __execPHP (the "fopen" method):

Code:
         $ctx = stream_context_create($opts);
-        $fp = fopen($this->api_base . $method, 'rb', null, $ctx);
+        $fp = @fopen($this->api_base . $method, 'rb', null, $ctx);
+        if (!$fp) {
+            return array(
+                'status' => 503,
+                'message' => 'Connection error',
+            );
+        }
         $response = stream_get_contents($fp);
         if($response && !$this->disable_curl) {
             $this->curl_warning = true;

fopen may echo warnings, so we silence it with an "@".
At the same time we add an error check to make sure it doesn't return NULL, for broken connections.

In __execCURL (the "curl" method):

Code:
         $response = curl_exec($ch);
-        if(!$response) {
-            $response = $this->__execPHP($method, $params);
-        }
         curl_close($ch);
 
+        if(!$response) {
+            return array(
+                'status' => 504,
+                'message' => 'Connection error',
+            );
+        }
         return $response;

Same deal with curl.

Note, that this changes the behavior of those 2 methods: originally they would either return JSON, either NULL/false, now they can also return an array. The error codes 503 and 504 were picked from the HTTP (they are for "503 (Service unavailable)" and "504 (Gateway timeout)"), but most importantly, they are currently unused by FaucetBOX.

Also note! Originally, faucetbox.php tries to use curl (unless $disable_curl is true) and if that fails, tries to use "fopen". The above change removes the "fopen" fallback from the curl method: if it failed, it failed, end of story.

To handle this new array, we also make this change in __exec:

Code:
         if($this->disable_curl) {
             $response = $this->__execPHP($method, $params);
         } else {
             $response = $this->__execCURL($method, $params);
         }
-        $response = json_decode($response, true);
+        if(is_array($response)) { //connection error
+            return $response;
+        }
+        $response = @json_decode($response, true);

This way, we now ALWAYS get an array, and probably will NEVER hit the following code:

Code:
        return array(
            'success' => false,
            'message' => 'Unknown error.',
            'html' => '<div class="alert alert-danger">Unknown error.</div>',
            'response' => json_encode($r)
        );

in "send".

Invalid response patch:

Let's imagine our next problem. Say faucetbox.com connects, but returns some unexpected data, instead of JSON. Why would that happen? Well, let's say they use CloudFlare protection; if they're being (D)DoS'ed, CloudFlare might return a response, but full of it's HTML instead of JSON. Some other proxying service or a gateway on their chain might do something similar.

(To test such situation, change
Code:
-protected $api_base = "https://faucetbox.com/api/v1/";
+protected $api_base = "http://localhost:80/";
where "localhost:80" is an actual webserver you control, and that would return some garbage/html/404 error page instead of expected JSON.)

Here's how we deal with it. In __exec:

Code:
+        $response = @json_decode($response, true);
         if($response) {
             $this->last_status = $response['status'];
         } else {
             $this->last_status = null;
+            $response = array(
+                'status' => 502,
+                'message' => 'Invalid response',
+            );
         }
         return $response;

Again, we silence possible json_decode warnings with an "@".
Additionally, if we can't parse it correctly, we return an array anyway.
502 error code (HTTP's "Bad gateway/Invalid response from upstream server") was picked for similar reasons: it's currently unused by FaucetBOX.

Timeout patch:

Now, we're ready to handle the more serious problem of timeouts. To test a timeout problem you might need a custom socket handler that never returns. If you have PHP 5.4, you can use the nifty 'php -S' feature, you might also be able to achive something like that with netcat, or a python script like this:

Code:
 #!/usr/bin/env python

import socket
import time

host = ''
port = 50000

waste_seconds = 600

s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
s.bind((host,port))
s.listen(5)
while 1:
    client, address = s.accept()
    data = client.recv(1024)
    print ("Connection from", address)
    if data:
     for i in range(0, waste_seconds):
         #client.send()
         time.sleep(1)
    print ("Letting go")
    client.close()

This script will run a TCP server on port 50000 and hang for "waste_seconds" (600) seconds instead of providing a response.

(Again, to test, we will change the api_base like that
Code:
-protected $api_base = "https://faucetbox.com/api/v1/";
+protected $api_base = "http://localhost:50000/";
where "50000" is the port our dummy server runs on.)

On to patching. Here, implemenations may differ quite a bit, but I think using half of PHP's max_execution_time is fair for both faucetbox and our script.

Code:
 {
     protected $api_key;
     protected $currency;
+    public $timeout = null;
     public $last_status = null;
     protected $api_base = "https://faucetbox.com/api/v1/";

- declared new variable to handle timeouts

Code:
     public function __exec($method, $params = array()) {
         $this->last_status = null;
+        if($this->timeout === null) {
+            $socket_timeout = ini_get('default_socket_timeout');
+            $script_timeout = ini_get('max_execution_time');
+            $this->timeout = min($script_timeout / 2, $socket_timeout);
+        }
         if($this->disable_curl) {


- set it to something, if it's NULL (half of max_execution_time)

Code:
+    public function setTimeout($timeout) {
+        $this->timeout = $timeout;
+    }
+

- allow to change it. This breaks faucetbox.php's coding standards a bit.

Code:
             "http" => array(
                 "method" => "POST",
                 "header" => "Content-type: application/x-www-form-urlencoded\r\n",
-                "content" => http_build_query($params)
+                "content" => http_build_query($params),
+                "timeout" => $this->timeout,
             ),
             "ssl" => array(
                 "verify_peer" => $this->verify_peer
             )
         );

- using it in "fopen" method (__execPHP)

Code:
         curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, $this->verify_peer);
         curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
+        curl_setopt($ch, CURLOPT_TIMEOUT, (int)$this->timeout);
 
         $response = curl_exec($ch);

- using it in "curl" method (__execCURL)

Notes: for streams, floats are allowed as "timeout" parameter, but for curl we should pass ints. In either case, if timeout is 0, there's no timeout (old behavior).

With all those patches applied, we can now do this:

Code:
$fb = new FaucetBOX();
$fb->setTimeout(NULL); //auto-generate timeout, default
$fb->setTimeout(0); //no timeout
$fb->setTimeout(10); //timeout is 10 seconds
$fb->send(....);

Bonus patch:

Code:
     public function send($to, $amount, $referral = "false") {
+        if ($referral === false) $referral = "false";
+        if ($referral === true) $referral = "true";

FaucetBOX library's send method expects $referral as string. This might be counter-intuitive to PHP devs, who would assume it's a bool.

This small patch allows for both bool and string to be used, i.e:
Code:
$fb->send('addr', 10000, true);
$fb->send('addr', 10000, 'true');
//same result

Phew! That took longer to explain, than to implement :)

SatoshiGalaxy - MMORPG Faucet - No investments - Satoshi payouts.
dart vader
Full Member
***
Offline Offline

Activity: 182
Merit: 100



View Profile
November 27, 2015, 08:53:37 AM
 #1258

well, this thread turned too geeky for me  Grin
Nomad88
Legendary
*
Offline Offline

Activity: 1568
Merit: 1268



View Profile WWW
November 27, 2015, 08:57:47 AM
 #1259

well, this thread turned too geeky for me  Grin

I agree  Smiley

Lucius
Legendary
*
Offline Offline

Activity: 3276
Merit: 5730


Top Crypto Casino BC.GAME🎲


View Profile WWW
November 27, 2015, 03:46:38 PM
 #1260

Sorry, but in my settings I found new:
Send limits
Limits of how much this faucet can payout in a 30 minute window.

What is it? What a "30 minute window"?

How much your faucet can send in 30 minutes. For example if you set it to 0.001 BTC, that's how much the faucet will be able to spend between 12:00 and 12:30. The amount that faucet has spent resets every 30 minutes. If your faucet tries to spend more than that, API will return:

Code:
{"status": 450, "message": "This faucet exceeded it's safety limits!"}

We also plan adding email notifications to that and optional "paranoid mode" that will reset the API kay if the limit is hit.

It's meant to be a protection from hackers stealing all coins if they get the API key in their hands and mass attacks of bots.
It seems great to me! Is there any way to change that message?
For example
Code:
This site has a maximum of x satoshi every half an hour.

I understand that the owners of the faucets want to protection from bots,but do not think about legitimate users.When a user opens your faucet message should warn them "This faucet exceeded it's safety limits!"
If I visit faucet several times today and I do all that is required instead of a reward I get this message it might be called cheating.
Also that new measure that ask to turn off AddBlock and Private Browsing in Firefox prevents in most cases using of faucet even if I disable both?

█████████████████████████
████▐██▄█████████████████
████▐██████▄▄▄███████████
████▐████▄█████▄▄████████
████▐█████▀▀▀▀▀███▄██████
████▐███▀████████████████
████▐█████████▄█████▌████
████▐██▌█████▀██████▌████
████▐██████████▀████▌████
█████▀███▄█████▄███▀█████
███████▀█████████▀███████
██████████▀███▀██████████
█████████████████████████
.
BC.GAME
▄▄░░░▄▀▀▄████████
▄▄▄
██████████████
█████░░▄▄▄▄████████
▄▄▄▄▄▄▄▄▄██▄██████▄▄▄▄████
▄███▄█▄▄██████████▄████▄████
███████████████████████████▀███
▀████▄██▄██▄░░░░▄████████████
▀▀▀█████▄▄▄███████████▀██
███████████████████▀██
███████████████████▄██
▄███████████████████▄██
█████████████████████▀██
██████████████████████▄
.
..CASINO....SPORTS....RACING..
Pages: « 1 ... 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 [63] 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 ... 156 »
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!