Unfortunately, still don't work (commenting or uncommenting that line)
https://104.28.29.86/api/v1/ goes to a Cloudflare error. Faucet remains unworking.
Ofc that when you open in the browser https://104.28.29.86/api/v1/ it goes to Cloudflare error.
But the script opens connection to 104.28.29.86:443 and then replaces Host: faucetbox.com
Then CURLOPT_SSL_VERIFYPEER disables the https domain check.
plumber-curl.php
$params = array_merge(array("api_key" => '', "currency" => 'BTC'));
$ch = curl_init('https://104.28.29.86/api/v1/');
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_POSTFIELDS, $params);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
curl_setopt($ch, CURLOPT_HTTPHEADER, array('Host: faucetbox.com'));
$response = json_decode(curl_exec($ch), true);
curl_close($ch);
print_r($response);
?>
Returns:
Invalid API method
So it works for me.