Examples for PHP Developers on how to setup SMS functionality
On this page you can find useful information
on how to use PHP to send and receive SMS messages.
This guide is an overview. It was designed to help you pick the
most appropriate method for your system.
Send / receive SMS from PHP using a database
Most PHP enabled websites use a database server (MySQL or PostgreSQL) for
data storage. These database solutions integrate well with the needs
of PHP developers. If you use a database server for your website, you
should consider to setup an SQL SMS Gateway configuration for your system
(Figure 1). The
SQL SMS Gateway configuration of Ozeki NG will work the following way:
You have to create two database tables. One will be used for receiving SMS
messages
(ozekimessagein) and another will be used to send SMS messages (ozekimessageout).
If an SMS message is received by the system Ozeki NG will insert a record into
ozekimessagein. Your PHP application can read the ozekimessagein database table
and check for incoming messages.
Figure 1 - PHP SMS from SQL
If you want to send a message, you can use the ozekimessageout table. You
can insert a record into ozekimessageout. Ozeki NG SMS Gateway will periodically
check your outgoing database table using an SQL SELECT and if it finds a
message to be sent it will send it.
This PHP - database - SMS solution is described in more detail on the following
pages:
How to setup an SQL SMS Gateway configuration
How to add SMS functionality to your website with
PHP and MySQL
MySQL information for SMS sending
Send / receive SMS from PHP using HTTP
If you don't have a database server attached to your website or you
do not want to use it, you can use HTTP requests and communicate directly
with the SMS Gateway (Figure 2).

Figure 2 - PHP SMS using HTTP
The advantage to this solution is that it is faster
in terms of reaction times. If you are receiving an SMS message using
an HTTP SMS Gateway configuration, you can react immediately with a
response SMS. The following pages discuss in great detail how you can
receive SMS messages or send SMS messages from your PHP enabled website
using HTTP.
Dig deeper!
People who read this also read...
Send SMS from a website using PHP
Send a business card (Vcard SMS) from PHP
Receive SMS on a website using PHP
Two way SMS solutions using PHP and HTTP
Next page:
PHP5 and MySQL
|