コード例 #1
0
ファイル: SendBinary.php プロジェクト: sabbir1991/intellisms
<?php

use IdacMedia\IntelliSms\IntelliSms;
include 'IntelliSms.php';
//Required php.ini settings:
// allow_url_fopen = On
// track_errors = On
//
//NOTE: To use https you will need the OpenSSL extension module
$sendresult_detailed = "";
$sendresult_summary = "";
if (isset($_POST['recipients']) && strlen($_POST['recipients']) != 0 && isset($_POST['udhex'])) {
    $objIntelliSMS = new IntelliSms();
    //Set you account login details below:
    $objIntelliSMS->Username = '******';
    $objIntelliSMS->Password = '******';
    //Send message
    $SendStatusCollection = $objIntelliSMS->SendBinaryMessage($_POST['recipients'], $_POST['udhhex'], $_POST['udhex'], $_POST['from']);
    //Generate result summaries for display in browser
    $sendresult_detailed = "<b>Result Details:</b><br>";
    $sendcount = 0;
    foreach ($SendStatusCollection as $SendStatus) {
        $sendresult_detailed = $sendresult_detailed . $SendStatus["To"] . "  " . $SendStatus["MessageId"] . "  " . $SendStatus["Result"] . "<BR>";
        if ($SendStatus["Result"] == "OK") {
            $sendcount++;
        }
    }
    $sendresult_summary = $sendcount . " out of " . count($SendStatusCollection) . " messages have been sent ok";
}
?>
コード例 #2
0
ファイル: SendUnicode.php プロジェクト: sabbir1991/intellisms
<?php

use IdacMedia\IntelliSms\IntelliSms;
//Tell browser to use UTF-8 encoding
header('Content-type: text/html; charset=UTF-8');
include 'IntelliSms.php';
//Required php.ini settings:
// allow_url_fopen = On
// track_errors = On
//
//NOTE: To use https you will need the OpenSSL extension module
$sendresult_detailed = "";
$sendresult_summary = "";
if (isset($_POST['recipients']) && strlen($_POST['recipients']) != 0 && isset($_POST['message'])) {
    $objIntelliSMS = new IntelliSms();
    //Set you account login details below:
    $objIntelliSMS->Username = '******';
    $objIntelliSMS->Password = '******';
    $objIntelliSMS->MaxConCatMsgs = $_POST['maxconcat'];
    //Convert test into AcsiiHex format
    $message_utf8 = $_POST['message'];
    $message_unicodehex = utf8toucs2hex($message_utf8);
    //Send message
    $SendStatusCollection = $objIntelliSMS->SendUnicodeMessageHex($_POST['recipients'], $message_unicodehex, $_POST['from']);
    //Generate result summaries for display in browser
    $sendresult_detailed = "<b>Result Details:</b><br>";
    $sendcount = 0;
    foreach ($SendStatusCollection as $SendStatus) {
        $sendresult_detailed = $sendresult_detailed . $SendStatus["To"] . "  " . $SendStatus["MessageId"] . "  " . $SendStatus["Result"] . "<BR>";
        if ($SendStatus["Result"] == "OK") {
            $sendcount++;
コード例 #3
0
ファイル: SendWapPush.php プロジェクト: sabbir1991/intellisms
<?php

use IdacMedia\IntelliSms\IntelliSms;
include 'IntelliSms.php';
//Required php.ini settings:
// allow_url_fopen = On
// track_errors = On
//
//NOTE: To use https you will need the OpenSSL extension module
$sendresult_detailed = "";
$sendresult_summary = "";
if (isset($_POST['recipients']) && strlen($_POST['recipients']) != 0 && isset($_POST['message'])) {
    $objIntelliSMS = new IntelliSms();
    //Set you account login details below:
    $objIntelliSMS->Username = '******';
    $objIntelliSMS->Password = '******';
    //Send message
    $SendStatusCollection = $objIntelliSMS->SendWapPushMessage($_POST['recipients'], $_POST['message'], $_POST['href'], $_POST['from']);
    //Generate result summaries for display in browser
    $sendresult_detailed = "<b>Result Details:</b><br>";
    $sendcount = 0;
    foreach ($SendStatusCollection as $SendStatus) {
        $sendresult_detailed = $sendresult_detailed . $SendStatus["To"] . "  " . $SendStatus["MessageId"] . "  " . $SendStatus["Result"] . "<BR>";
        if ($SendStatus["Result"] == "OK") {
            $sendcount++;
        }
    }
    $sendresult_summary = $sendcount . " out of " . count($SendStatusCollection) . " messages have been sent ok";
}
?>
コード例 #4
0
ファイル: GetBalance.php プロジェクト: sabbir1991/intellisms
<?php

use IdacMedia\IntelliSms\IntelliSms;
include 'IntelliSms.php';
//Required php.ini settings:
// allow_url_fopen = On
// track_errors = On
//
//NOTE: To use https you will need the OpenSSL extension module
$objIntelliSMS = new IntelliSms();
//Set you account login details below:
$objIntelliSMS->Username = '******';
$objIntelliSMS->Password = '******';
//Get Balance
$Results = $objIntelliSMS->GetBalance();
$ErrorStatus = $Results["ErrorStatus"];
$Balance = $Results["Balance"];
?>



<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title>Get Balance</title>
</head>
<body>
<h1>Get Balance</h1>
<br>