$url = "https://gatewayapi.com/rest/mtsms"; $api_token = "THIS_API-TOKEN"; //Set SMS recipients and content $recipients = [4512345678, 4587654321]; json = [ 'sender' => 'ExampleSMS', 'message' => 'Hello world', 'recipients' => [], ]; foreach ($recipients as $msisdn) { $json['recipients'][] = ['msisdn' => $msisdn]; } //Make and execute the http request //Using the built-in 'curl' library $ch = curl_init(); curl_setopt($ch,CURLOPT_URL, $url); curl_setopt($ch,CURLOPT_HTTPHEADER, array("Content-Type: application/json"))); curl_setopt($ch,CURLOPT_USERPWD, $api_token.":"); curl_setopt($ch,CURLOPT_POSTFIELDS, json_encode($json)); curl_setopt($ch,CURLOPT_RETURNTRANSFER, true); $result = curl_exec($ch); curl_close($ch); print($result); $json = json_decode($result); print_r($json->ids);

futurecareerschool

Future Career School

Table of Contents
< All Topics

About KB Add-ons

Access Manager

Access Manager allows administrators, companies, and organizations to control and restrict access to their private Knowledge Base based on WordPress user accounts. Grant permission using roles and groups.
Learn More

Elegant Layouts

Elegant Layouts adds Grid and Sidebar Layouts. Use Grid Layout or Sidebar Layout for KB Main page or combine Basic, Tabs, Grid and Sidebar layouts in a variety ways.
Learn More

Unlimited Knowledge Bases

Create multiple Knowledge Bases, one for each product, service, topic or department. Each Knowledgebase has separate articles, URLs, KB Main Page and admin screens.
Learn More

Advanced Search

Enhance users’ search experience and view search analytics, including popular searches and no results searches.
Learn More

Article Rating and Feedback

Let your readers rate the quality of your articles and submit insightful feedback. Collect analytics on the most and least rated articles.
Learn More

Widgets

Add Knowledgebase Search, Most Recent Articles and other Widgets and Shortcodes to your articles, sidebars and pages.
Learn More

Links Editor for PDFs and More

Set Articles to links to PDFs, pages, posts and websites. On KB Main Page, choose icons for your articles.
Learn More

Submit a Comment

Your email address will not be published. Required fields are marked *

Confused for your Career?

Connect & Consult with our Best Career Counsellors