Bitcoin Forum

Economy => Micro Earnings => Topic started by: claimcoin on October 30, 2017, 08:16:10 AM



Title: need help
Post by: claimcoin on October 30, 2017, 08:16:10 AM
how add Faucethub Withdrawal Method in my site www.cut4.cash
need php code


Title: Re: need help
Post by: mexicantarget on October 30, 2017, 08:44:54 AM
Here's PHP code:
https://faucethub.io/phplib


Title: Re: need help
Post by: claimcoin on October 30, 2017, 10:14:21 AM
Here's PHP code:
https://faucethub.io/phplib
i get this
Not Found
Error: The requested address '/faucethub.php' was not found on this server.


Title: Re: need help
Post by: mexicantarget on October 30, 2017, 10:17:40 AM
Here's PHP code:
https://faucethub.io/phplib
i get this
Not Found
Error: The requested address '/faucethub.php' was not found on this server.
It's not on the correct directory. Look into how to include classes and files.

This is some basic stuff you need to work on.


Title: Re: need help
Post by: Kema on October 30, 2017, 11:20:13 AM
Pretty much any of the faucet scripts you'll find out there has a working implementation of payment with Faucethub.io.
So, look at the API ref material and check out a faucet script or two for fully working example code.
There's only a handful lines of code in total that you need to have it up and running.


Title: Re: need help
Post by: tungaqhd on October 30, 2017, 02:44:08 PM
Step1: Download this file and upload it to the same folder with the file which will proccess the payout https://faucethub.io/phplib/download
Step2: Add :
Code:
include 'faucethub.php';
$api_key = "YOUR_API_KEY";
$currency = "BTC"; # or LTC or any other supported by FaucetHub
$faucethub = new FaucetHub($api_key, $currency);
$result = $faucethub->send("1asdbitcoinaddressheredsa", 500);

if($result["success"] === true) {   # you can check if it was successful
    #update user's balance and echo $result["html"];           # there's example html ready for you
} else {                            # something went wrong :(
    log_error($result["response"]); # you can log whole response from server
    echo $result["html"];           # and display error message to user
}


Title: Re: need help
Post by: btcvic63 on November 01, 2017, 01:42:56 AM
the site is great Mex, grats