SEARCH
0-9 A B C D E F G H I J K L M N O P Q R S T U V W X Y Z
Prev | Current Page 165 | Next

Nirav Mehta

"Mobile Web Development"

mms to the POTR server.
2. Now let's add a function to our SMSGateway class. This function will take all
parameters and pass them to the Clickatell gateway. Notice that the API URL
is different and we need to authenticate for sending the notification.
public function SendMMS($username, $password, $apiId, $to, $from,
$subject, $mms_from, $mms_url)
{
$to = $this->CleanUpPhoneNumber($to);
if ($to == "")
{
return false;
}
// The API URL is slightly different for MMS
$this->apiURL = "http://api.clickatell.com/mms/";
// We also need to authenticate for this call
$params['user'] = $username;
$params['password'] = $password;
$params['api_id'] = $apiId;
$params['to'] = $to;
$params['from'] = $from;
$params['mms_subject'] = $subject;
$params['mms_class'] = 82; // 80 (Personal), 81
// (Advertisement), 82 (Informational), 83 (Auto)
$params['mms_expire'] = 3000; // Expiry time in seconds
$params['mms_from'] = $mms_from;
$params['mms_url'] = $mms_url;
$params['to'] = $to;
$command = "ind_push.php";
if ($this->Request($command, $params))
{
return true;
}
}
Adding Spice to Messages: MMS
[ 132 ]
3. We can now create a new PHP file to send out MMS messages using this
function.


Pages:
153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177
hotel jelenia góra Russian bride Free English grammar and study guid powiekszenia wielkoformatowe counter strike 1.6