Hi all.
I have a web application that sends SMS via a bulk gateway. The following will echo out the status report of a sent message.
It can return the following;
What I'd like to do is have this as part of the page that sent the SMS, and to constantly check the status until it reaches on of the 'final' states.
I'm not really sure how to go about doing that though.
Any pointers?
I have a web application that sends SMS via a bulk gateway. The following will echo out the status report of a sent message.
Code:
$results = $api->messageStatus(array($msgID));
foreach($results as $msgId => $msgInfo) {
echo $msgInfo['status'];
}
It can return the following;
Code:
q intermediate The message is queued on the TextMagic server.
r intermediate The message has been sent to the mobile operator .
a intermediate The mobile operator has acknowledged the message.
b intermediate The mobile operator has queued the message.
d final The message has been successfully delivered to the handset.
f final An error occurred while delivering message.
e final An error occurred while sending message.
j final The mobile operator has rejected the message.
u final The status is unknown.
s intermediate This message is scheduled to be sent later.
What I'd like to do is have this as part of the page that sent the SMS, and to constantly check the status until it reaches on of the 'final' states.
I'm not really sure how to go about doing that though.
Any pointers?