PHP Examples for developers on how to set up two way SMS functionality using Ozeki PHP API
If you are looking for SMS API-s which helps you to
send and receive text messages from a website quickly and easily read our guide
about how to use the Ozeki NG SMS Gateway PHP API.
With this PHP SMS API you do not
need to work hours to integrate this solution to your system.
How to send / receive SMS text 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 text messages (ozekimessagein) and another will be used to send SMS text messages (ozekimessageout). If an SMS message is received by the system Ozeki NG SMS Gateway will insert a record into ozekimessagein. Your PHP application can read the ozekimessagein database table and check for incoming messages.
If you want to send a text 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.
With this easy method you can set up a two way SMS communication channel.
If you are interested in this PHP - database - SMS solution click the following pages for more information:
How to setup an SQL SMS Gateway configuration
How to add SMS functionality to your website with PHP API and MySQL
MySQL information for SMS sending
How to send/receive SMS from PHP using HTTP API
If you don't have a database server connected to your website or you do not want to use it, you can use HTTP API and communicate directly with the Ozeki NG SMS Gateway (Figure 2).
The main advantage to this solution is that it is faster in terms of reaction times in two way sms communication. If you are receiving an SMS text message using an HTTP API as SMS Gateway configuration, you can react immediately with a response SMS.
The following pages discuss in great detail how you can receive SMS text messages or send SMS text messages from your PHP enabled website using HTTP API.
More information
- How to send SMS from a website using PHP and MySQL
- How to send a business card (Vcard SMS) from PHP
- How to receive SMS on a website using PHP API
- Two way SMS solutions using PHP and HTTP API
- How to send SMS from a website using PHP API
- How to add SMS functionality to a website using PHP API
- Send SMS from PHP using HTTP
- FAQ of the Ozeki NG SMS Gateway