示例#1
0
 function sms_send($a)
 {
     /*chikka*/
     $clientId = 'ea881f77f6947fcbe4aa84df66d733eb617d77aea1cbbd4b2d8f50bfa298c386';
     $secretKey = '9f1dbda694e56d434ae019e46d0576b5b301dabd7f93408ca5ec911f590960d6';
     $shortCode = '2929052621';
     $chikkaAPI = new ChikkaSMS($clientId, $secretKey, $shortCode);
     $response = $chikkaAPI->sendText('Activations', $a['phone_num'], $a['msg']);
     header("HTTP/1.1 " . $response->status . " " . $response->message);
     exit($response->message);
 }
示例#2
0
<?php

/**
 * This file will show a simple implementation on how to send SMS using Chikka API
 * @author Ronald Allan Mojica
 * 
 */
include 'ChikkaSMS.php';
$clientId = 'xxxxx';
$secretKey = 'xxxxxx';
$shortCode = 'xxxxxx';
$chikkaAPI = new ChikkaSMS($clientId, $secretKey, $shortCode);
$response = $chikkaAPI->sendText('1234561', '6391561866732', 'tests');
header("HTTP/1.1 " . $response->status . " " . $response->message);
exit($response->description);
<?php

/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
include 'ChikkaSMS.php';
$clientId = 'xxxxx';
$secretKey = 'xxxxxx';
$shortCode = 'xxxxxx';
$chikkaAPI = new ChikkaSMS($clientId, $secretKey, $shortCode);
if ($_POST) {
    if ($chikkaAPI->receiveNotifications() === null) {
        header("HTTP/1.1 400 Error");
        echo "Message has not been processed.";
    } else {
        echo "Message has been successfully processed.";
    }
    var_dump($chikkaAPI->receiveNotifications());
}