Tutorial for EMG PHP API
Sample usage of EMG PHP API
Table of Contents
Sending a message
<?php
require_once 'mgp.php';
$host = "127.0.0.1";
$port = "7185";
$username = "emguser";
$password = "secret";
$emg->connect($host, $port);
$emg->logon($username, $password);
MGP::OPTION_SOURCEADDR =>
"4670123123",
MGP::OPTION_DESTADDR =>
"70123123",
MGP::OPTION_MESSAGE =>
"Hello World"
);
$result = $emg->sendMessage($sms);
$retcode = $result['retcode'];
if($retcode !=
MGP::ERR_OK) {
echo "message failed retcode=$retcode";
} else {
$id = $result['messageid'];
echo "message sent ok id=$id";
}
$emg->logoff();
?>
Documentation generated on Tue, 24 Feb 2009 18:16:09 +0100 by phpDocumentor 1.4.2