- How to buy
- Quick Start Guide
- System requirements
- Installation guide
- User guide
- Developers guide
- SMS from/to Database
- HTTP API
- PHP SMS API
- SMS from Website (MySQL, PHP)
- SMS from Website (HTTP API, PHP)
- C# SMS API
- VB.NET SMS API
- Service providers guide
PHP SMS API
You can easily build a website for SMS messaging with the Ozeki PHP API. This tutorial shows you how to use Ozeki SMS Gateway's PHP API. It will take you less then an hour to integrate the solution that can send and receive messages from a MySQL database.
In most cases there is a database server behind PHP enabled websites and the implementation is done by PHP developers. If you are already using a database server for your website, you should consider an SQL SMS Gateway PHP solution.
Please create two database tables in a database for sending and receiving messages. The default sender table in our example is ozekimessageout, while the default receiver table is ozekimessagein.
If Ozeki SMS Gateway receives a message then a new record will be inserted in the incoming message table. Your PHP application should easily find every available message record.
When sending an SMS message you should insert a new record into the outgoing message table, which is called ozekimessageout in this tutorial. It should be periodically checked by Ozeki SMS Gateway with a simple SQL SELECT statement to find messages that should be sent.
You can set up a two way SMS communication channel with this simple strategy (Figure 1).
Figure 1 - Ozeki SMS Gateway's Database + PHP SMS solution (Two way communication method)
Please check out the video to see how to send SMS messages from a website.
Check these sites for relevant information:
How to set up a Database User in Ozeki SMS Gateway
How to connect the Database User to your MySQL database
(you can use other database solutions as well)
You can send or receive SMS messages by directly communicating with Ozeki SMS Gateway's HTTP API (Figure 2). This method does not need any database server connection.
Figure 2 - Ozeki SMS Gateway's HTTP API + PHP SMS solution (Two way communication method)
This solution has a great advantage, which is speed. The two way communication is direct and fast. It can also generate automatic SMS message responses as well.