<?php
// Quick test to see if send_otp.php works

$data = json_encode([
    'action' => 'send_signup_otp',
    'email' => 'newemail' . time() . '@example.com',
    'name' => 'Test User',
    'phone' => '9876543210',
    'password' => 'password123',
    'confirmPassword' => 'password123'
]);

$ch = curl_init('http://localhost/rest_table/backend/send_otp.php');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_POSTFIELDS, $data);
curl_setopt($ch, CURLOPT_HTTPHEADER, ['Content-Type: application/json']);

$response = curl_exec($ch);
$httpCode = curl_getinfo($ch, CURLINFO_HTTP_CODE);
$error = curl_error($ch);

curl_close($ch);

echo "HTTP Code: " . $httpCode . "\n";
echo "Response: " . $response . "\n";
if ($error) {
    echo "CURL Error: " . $error . "\n";
}
?>
