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 143 | Next

Nirav Mehta

"Mobile Web Development"


Shortcode: A short (usually 4 digits) number that is used in premium SMS
services to send messages to. Generally, the same shortcode is available
across multiple mobile operators.
Finding Message Delivery Status
We are sending out messages, but don't have a way to find out if they get delivered.
Unless we find that out, we are not really sure what happens to them. We won't even
know how much time it takes to deliver messages! Luigi can't live in a limbo like
this, so let us build a mechanism to track messages.
Time for Action: Tracking Queued Messages
1. Create a table called "messages". The fields will be id (primary key),
gwId (gateway message ID), requestDate, to (phone number), message
(the actual message), and status (enum: Q for queued, G for delivered to
upstream gateway, R for received, and F for failed).
2. Create a class "Message" extending the BaseModel. Add variables to map
to the table fields. This is simply a data holder class and will look like the
following code.
class Message extends BaseModel
{
public $_to;
public $_message;
public $_requestDate;
Chapter 6
[ 111 ]
public $_status;
public $_gwId;
public function __construct($tableName = "messages",
$data = null)
{
parent::__construct($tableName, $data);
}
}
3.


Pages:
131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155
hotel jelenia góra Russian bride Free English grammar and study guid powiekszenia wielkoformatowe counter strike 1.6