PHP
Send SMS
Send SMS
\$baseUrl = 'http://192.168.1.100:8080';
\$ch = curl_init(\$baseUrl . '/api/send-sms');
curl_setopt_array(\$ch, [
CURLOPT_POST => true,
CURLOPT_POSTFIELDS => json_encode([
\'phone\' => \'+49123456789\',
\'message\' => \'Hello from GSM Modem API\'
]),
CURLOPT_HTTPHEADER => [\'Content-Type: application/json\'],
CURLOPT_USERPWD => \'USERNAME:PASSWORD\',
CURLOPT_RETURNTRANSFER => true
]);
$response = curl_exec($ch);
curl_close($ch);
echo $response;