<?php
$ch = curl_init('https://textbelt.com/text');

$data = array(
  'phone' => '447587384902',             // Replace with real phone number, including country code
  'message' => 'This message from the OCAi!',
  'key' => '72f83418dd480b875860f2ccb57100902a346e69OHPzwNdSKlnHoEbHbn6NoxMKl',    // Replace with your actual paid API key
);

curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode($data));
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_HTTPHEADER, array(
  'Content-Type: application/json'
));

$response = curl_exec($ch);
curl_close($ch);

// Print the result
$responseData = json_decode($response, true);
print_r($responseData);
?>

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Send SMS with Textbelt</title>
    <style>
        body { font-family: Arial, sans-serif; margin: 2rem; }
        form { max-width: 400px; margin: auto; }
        input, textarea, button {
            width: 100%; padding: 10px; margin: 8px 0;
            box-sizing: border-box;
        }
        .message {
            margin-top: 15px;
            font-weight: bold;
            color: green;
        }
    </style>
</head>
<body>

</body>
</html>
