$number, "msg" => $message, 'charset' => 'utf-8', 'mode' => 'Standard', 'strategy' => '2' ]; curl_setopt_array($curl, [ CURLOPT_URL => 'https://api.smsbox.pro/1.1/api.php', CURLOPT_RETURNTRANSFER => true, CURLOPT_POST => true, CURLOPT_POSTFIELDS => http_build_query($postData), CURLOPT_HTTPHEADER => [ 'Content-Type: application/x-www-form-urlencoded', 'Authorization: App ' . $apiKey, ], ]); $response = curl_exec($curl); $httpCode = curl_getinfo($curl, CURLINFO_HTTP_CODE); logNewMessage(LOG_DEBUG, 'SMS gateway response: ' . $response); if (($httpCode !== 200) || ($response !== 'OK')) { logNewMessage(LOG_ERR, 'Unable to send SMS: ' . $response); throw new LAMException(null, ''); } } /** * @inheritDoc */ public function usesApiToken(): bool { return false; } /** * @inheritDoc */ public function usesApiKey(): bool { return true; } /** * @inheritDoc */ public function usesAccountId(): bool { return false; } /** * @inheritDoc */ public function usesFrom(): bool { return false; } /** * @inheritDoc */ public function usesRegion(): bool { return false; } /** * @inheritDoc */ public function usesSubject(): bool { return false; } }