This guide shows you how to create an example SMS application and
gives you the steps to create it. It uses Ozeki NG as the SMS gateway
platform and an ASP script to process incoming SMS messages. You may
use and modify this ASP script freely to accommodate your needs.
The application is PIN code game. The users of the game can send in
PIN codes to find out treasure locations. If the PIN code matches an
entry in the database, the appropriate treasure location is returned.
A treasure location is only returned to the first person who sends in
the correct PIN code, the other who are late will receive the "Treasure
is already taken" message (Figure 1).
After you are able to send and receive SMS messages, you need to
a database that will hold the data for the game. Any kind of database can
be used. In our example we use Microsoft SQL Express. (It can be downloaded
free of charge from Microsoft.)
The next step is to install an ASP
User in Ozeki NG SMS gateway. This will allow you to execute an ASP script
when an SMS comes in. The ASP script will hold the application logic, that will
process the SMS message and will generate the response SMS messages.
The source script can be downloaded from the http://www.ozekisms.com/ website:
sample.zip (2 KB)
How can I test this solution?
The system can be tested easily. You can send an SMS message to the phone
number of the GSM modem that is attached to your computer. After the
message is sent, you will receive a response SMS. Of course
you will probably want to modify the ASP script, that does the processing
to your needs. If you modify the ASP script, you will find it useful during the
development to see the raw script output. The script output that was generated
when an SMS arrived to the gateway can be found at the following location:
"C:\Program Files\Ozeki\OzekiNG - SMS Gateway\config\ASPDemo\output.htm";