Post
Topic
Board Micro Earnings
Re: [Question] Alpha Faucet Script | Integrated with Short links
by
cr3at1v3
on 30/07/2017, 03:23:05 UTC
hello guys. i like this script since it's lite and easy to use. so i am suggesting that if we could share some ideas how to improve or enhance the script to make it great and popular.

i am not good in coding but i will share the code i saw from other forums, the code will show Faucethub Balance in your faucet, this has not been added to the faucet script yet, i just integrate it with mine. you can use this if you like, credit not mine since i only saw this and tried and it worked.

Code:
  // Get cURL resource
$curl curl_init();
// Set some options
curl_setopt_array($curl, array(
CURLOPT_RETURNTRANSFER => 1,
CURLOPT_URL => 'https://faucethub.io/api/v1/balance',
CURLOPT_HTTPHEADER, array('Content-Type: application/json'),
CURLOPT_POST => 1,
CURLOPT_POSTFIELDS => array(
api_key => 'YOUR API KEY',
currency => 'BTC'
)
));
// Send the request & save response to $resp
$resp curl_exec($curl);
// Close request to clear up some resources
curl_close($curl);

$json json_decode($resptrue);

// print_r($json);
echo $json['balance_bitcoin'];
?>

just input the necessary data here api_key => 'YOUR API KEY'

output, echo $json['balance_bitcoin']; or echo $json['balance'];

i have used it in my faucet site. Faucet Link