$content, 'phone_id' => $phone_id, 'to_number' => $to_number, ), '', '&')); // if you get SSL errors, download SSL certs from https://telerivet.com/_media/cacert.pem . // curl_setopt($curl, CURLOPT_CAINFO, dirname(__FILE__) . "/cacert.pem"); $json = curl_exec($curl); $network_error = curl_error($curl); curl_close($curl); if ($network_error) { $message_html = "
".htmlspecialchars($network_error)."
"; } else { $res = json_decode($json, true); if (isset($res['error'])) { $message_html = "
".htmlspecialchars($res['error']['message'])."
"; } else { $message_html = "Message sent! (status: ". htmlspecialchars($res['status']). ")"; $content = ''; } } } else { $message_html = ''; $to_number = ''; $content = ''; } ?> Telerivet API Example: Send SMS

Telerivet API Example: Send SMS

Phone Number


Message