Turn your messages into performance drivers Discover Rich Business Messaging

Extend the reach of RCS with SMS

Weitere Informationen

Increase the scope of RCS with SMS failoverRead the article

Increase the reach of RCS with SMS failoverRead the article

Increase the reach of RCS with SMS . Find out more.

Interface SMS directly into your PHP development environment

Want to send SMS messages instantly from your PHP-based application, website, software or CRM? Nothing could be easier with our API SMS REST or HTTP APIs, which enable you to interface the sending of SMS messages directly into your PHP development. Thanks to the various requests, our webservice lets you use the full potential of SMS. Follow our quick start guide.

sms php

Send SMS in PHP via smsmode©

Simple, secure API integration

Take advantage of our comprehensive, free documentation to integrate sending and receiving receiving SMS via API.

Security & business continuity

The platform smsmode© is ISO 27001 certified and hosted in France. The source code of our SMS APIs benefits from redundancy in 2 data centers.

Continuous service

Our dedicated infrastructure benefits from constant availability. It is monitored 24/7, 365 days a year.

Technical support at your service

Our dedicated team of developers is available to help you integrate our APIs SMS or answer any questions you may have.

TO FIND OUT MORE
Subscription formulas for ultra-competitive rates
subscription form

STARTER GUIDE

How to send SMS PHP?

The PHP library integrated into our HTTP API makes it easy to generate SMS from a website, application or software solution. Compatible with the most common programming languages (PHP, Java, ASP, C++, Ruby, WINDEV, Curl, etc.), this gateway SMS is open source.

The ready-to-use PHP code below lets you send your first SMS :


const ERROR_API = "Error during API call\n";
const ERROR_FILE = "The specified file does not exist\n";
const URL = "https://api.smsmode.com/http/1.6/";
const PATH_SEND_SMS = "sendSMS.do";
const PATH_SEND_SMS_BATCH = "sendSMSBatch.do";
 
/**
* Function parameters:
*
* - accessToken (required)
* - message (required)
* - destinataires (required): Receivers separated by a comma
* - emetteur (optional): Allows to deal with the sms sender
* - optionStop (optional): Deal with the STOP sms when marketing send (cf. API HTTP documentation)
* - batchFilePath (required for batch mode): The path of CSV file for sms in Batch Mode
*/
 
class ExempleClientHttpApi 
{
 // send SMS with GET method
 public function sendSmsGet($accessToken, $message, $destinataires, $emetteur, $optionStop) 
 {
 $message = iconv("UTF-8", "ISO-8859-15", $message);
 $fields_string = '?accessToken='.$accessToken.'&message='.urlencode($message).'&numero='.$destinataires.'&emetteur='.$emetteur.'&stop='.$optionStop;
 
 $ch = curl_init();
 curl_setopt($ch,CURLOPT_RETURNTRANSFER, true);
 curl_setopt($ch,CURLOPT_URL, URL.PATH_SEND_SMS.$fields_string);
 $result = curl_exec($ch);
 curl_close($ch);
 if (!$result) {
 return ERROR_API;
 }
 return $result;
 }
 
 // send SMS with POST method
 public function sendSmsPost($accessToken, $message, $destinataires, $emetteur, $optionStop) 
 {
 $message = iconv("UTF-8", "ISO-8859-15", $message);
 $fields_string = 'accessToken='.$accessToken.'&message='.urlencode($message).'&numero='.$destinataires.'&emetteur='.$emetteur.'&stop='.$optionStop;
 
 $ch = curl_init();
 curl_setopt($ch,CURLOPT_RETURNTRANSFER, true);
 curl_setopt($ch,CURLOPT_URL, URL.PATH_SEND_SMS);
 curl_setopt($ch,CURLOPT_POST, 1);
 curl_setopt($ch,CURLOPT_POSTFIELDS, $fields_string);
 $result = curl_exec($ch);
 curl_close($ch);
 if (!$result) {
 return ERROR_API;
 }
 return $result;
 }
 
 // send SMS with POST method (Batch)
 public function sendSmsBatch($accessToken, $batchFilePath, $optionStop) 
 {
 if (!file_exists($batchFilePath)) {
 return ERROR_FILE;
 }
 
 $fields_string = '?accessToken='.$accessToken.'&stop='.$optionStop;
 $cfile = new CurlFile($batchFilePath, 'text/csv');
 $data = array('data-binary' => $cfile);
 
 $ch = curl_init();
 curl_setopt($ch,CURLOPT_RETURNTRANSFER, true);
 curl_setopt($ch, CURLOPT_HTTPHEADER, array( 'content-type: multipart/form-data'));
 curl_setopt($ch,CURLOPT_URL, URL.PATH_SEND_SMS_BATCH.$fields_string);
 curl_setopt($ch,CURLOPT_POST, 1);
 curl_setopt($ch,CURLOPT_POSTFIELDS, $data);
 $result = curl_exec($ch);
 curl_close($ch);
 if (!$result) {
 return ERROR_API;
 }
 return $result;
 }
}

The documentation and SDK supplied with our SMS API will guide you step-by-step through the implementation of all the functionalities involved in sending SMS : sending SMS in bulk or individually, managing contacts, consulting the credits available on your customer account, programming the date and time of sending, consulting the status of receipt, direct mail, and so on. In this way, you can make the most of SMS : notification via SMS, mobile marketing campaigns to cell phones, sending alerts and reminders, creating automatic response systems, etc.

Why use our SMS platform?

More than 10,000 customers have used our API to develop innovative communication services by SMS directly in their applications. Among them, Doctolib and the confirmation of medical appointments, Géotraceur and the sending of alerts to connected objects, Tripadvisor and the confirmation of reservations by SMS, etc.

Operator-direct premium routing

Our status as an ARCEP telecom operator means that traffic is routed directly to French and international operators. This rules out any use of roaming, low-cost or SIM-based solutions. A guarantee of quality for maximum deliverability.

Service quality commitment

Our SLA (Service Level Agreement) guarantees an UpTime of 99.9%. We monitor dispatch performance in real time, and prioritize critical traffic using OTP (One Time Password) technology at SMS .

Flexible, no-obligation solution

Whether you use our API, SaaS platform or CRM plugin, installation of our SMS mailing service is free of charge and requires no subscription. You will only be billed for the SMS sent.

Proximity with responsive technical support

For all your questions, our technical support is available every day of the week from 9am to 12pm and from 2pm to 5:30pm. With teams in France, Spain and Italy, we offer you the proximity and responsiveness you need to make your project a success.

Data confidentiality and compliance with legal obligations

Privacy Tech certified and compliant with all French legal requirements on mobile marketing, smsmode© is committed to total customer data protection and automatic unsubscribe management (or STOP SMS).

REPORT
Digital security at smsmode© ?
Discover our data protection and privacy measures designed with RGPD compliance in mind.
safety report smsmode

Create your free account

Try out our SMS platform and benefit from 20 free test credits, with no obligation.

Need more info?
We look forward to hearing from you.