Integrate Transmitsms SMS API use with PHP cURL

Transmit SMS API use with PHP cURL.

Send SMS by using API to retrieve information about messages and campaigns. Below the PHP code for how to use Transmit SMS API.

<?php

$post = array(
'to' => '919999******',
'from' => 'MyFreeOnlineTools',
'message' => 'Thanks for subscribe with MyFreeOnlineTools. Our Online Free tools help you for work fast. Click Here [tracked-link]',
'tracked_link_url' => 'http://myfreeonlinetools.com/'
);

$ch = curl_init('https://api.transmitsms.com/send-sms.json');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS,$post);
curl_setopt($ch, CURLOPT_USERPWD, "APIKEY:APISECRET");

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

?>

Developer documentation for implement transmit SMS API by PHP & cURL: Click Here

API Key & API Secret

API requests require API credentials, you find them once login in your account on the setting page. Scroll down to API Setting to find out API key and API Secret.

API Key & API Secret of Transmit SMS API

Send SMS API Parameters

KEY TYPE DESCRIPTION
message string Message Content up to 612 alhanumeric characters
to string Receient Number or Numbers
list_id integer Recipient list
countrycode string Format the to number in international format.
from string Sender ID
send_at datetime Schedule of Message Send
validity integer Expire a message send if undelivrable
tracked_link_url url Convert this URL into Unique shot URL

For More Details reffer developer document link below

Developer Documentation for Transmit SMS API