$api_key,
'to' => $email,
'amount' => $amount,
'currency' => $currency
];
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, "https://faucetpay.io/api/v1/send");
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, http_build_query($post_data));
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$response = curl_exec($ch);
curl_close($ch);
$data = json_decode($response, true);
if ($data['status'] === 200) {
echo "✅ LTC sent successfully to $email!";
} else {
echo "❌ Error sending LTC: " . $data['message'];
}
?>