Send SMS Sample Code
Sample code using Send SMS API.
Sample PHP Code
<?php
$request = array(
"user"=>"{USERNAME}",
"pass"=>"{PASSWORD}",
"from"=>"API_COMPANY",
"to"=>"2347007008008",
"msg"=>"Hello World",
);
$url = 'https://sms.hollatags.com/api/send/'; //this is the url of the gateway's interface
$ch = curl_init(); //initialize curl handle
curl_setopt($ch, CURLOPT_URL, $url); //set the url
curl_setopt($ch, CURLOPT_POSTFIELDS, http_build_query($request)); //set the POST variables
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); //return as a variable
curl_setopt($ch, CURLOPT_POST, 1); //set POST method
$response = curl_exec($ch); // grab URL and pass it to the browser. Run the whole process and return the response
curl_close($ch); //close the curl handle
echo $response;
Sample Go code
Sample NodeJS code
Sample C# code
Last updated
Was this helpful?