FrontlineSMS let users send, receive and manage SMS over a mobile network.


just started using frontlinesms cloud for the first time - and its great - brilliant extension of frontline


i'm trying to get my back-end server stuff to send some messages through the api, but can't seem to get my head round how what works

do you have any working code snippets of php to break the process down - trying to get a project live in a very short space of time

thanks a lot


Views: 392

Reply to This

Replies to This Discussion

solved it

with some hep from support:

this page with a slight tweak so that it ended up reading:


<?php //FILE: sms_api.php
function sendSMS($number,$message,$concat = 1) {
$url = 'your api connection here';
    $request = array("secret"=>"standUp",

                              "message" => "hello",

                              "recipients" => array (0  =>array (  "type"=>"address", "value"=>"$number" )

$req = json_encode($request);
$ch = curl_init( $url );
curl_setopt( $ch, CURLOPT_HTTPHEADER, array('Content-Type:application/json'));
curl_setopt( $ch, CURLOPT_POST, true );
curl_setopt( $ch, CURLOPT_POSTFIELDS, $req );
curl_setopt( $ch, CURLOPT_RETURNTRANSFER, true );
$result = curl_exec($ch);
return split(',',$result);


hope that helps anyone else stuck


Really glad you guys got this working! And thanks for posting your fix Ben.


Really happy to see this working atlast. I am in love with frontline SMS now. Thanks guys.


Guys, I'm encountering the same issue as was previously mentioned by Narshion here. Running the sample code according to my configurations returns Array ([0] => )
Can anyone help me fix the issue? What's interrupting my connection?

Reply to Discussion


© 2017   Created by FrontlineSMS Admin.   Powered by

Badges  |  Report an Issue  |  Terms of Service