Additional SMS Info
Group Messaging Example
<?php
header('Content-type: text/xml');
echo("<?xml version=\"1.0\"?>\n");
// The list of people in this group
$group = array('12125550000'=>'Michael', '12125550001'=>'Bob', '12125550002'=>'Lindsay', '12125550003'=>'Jim');
// Make sure the sender is part of this group
if ( isset($_POST['from']) && isset($group[$_POST['from']]) ) {
echo('<reply>');
// Reply to everyone except the sender
foreach ($group as $to=>$contact) {
if ($to != $_POST['from']) {
echo("<sms_message to=\"$to\">".htmlspecialchars($_POST['body']).'</sms_message>');
}
}
echo('</reply>');
}
else { echo('<reply/>'); }
?>The <sms_message> Tag
Last updated