Integration of Headwind GSM Modem Driver with PHP
Download PHP class and examples!
Request custom web application development!
With Headwind GSM Modem Driver you can either send SMS from the website (for example, through a SMS sending
form) or process received SMS on the website (for example, by writing SMS messages in a guest book).
To add SMS capability to the web portal, you need to setup a Windows-based SMS server connected with one or several GSM
devices, where Headwind GSM Modem Driver is installed.
The SMS server interacts with the
web server through the HTTP protocol. SMS server is a HTTP client, it requests the status of a web server
once per some seconds, using "SMS source" script. Received SMS are sent to the web server through the
How to start the PHP example
- Install Headwind GSM Modem Driver and setup the connection with a GSM modem;
- Download PHP class for SMS functionality
and upload files to your web server;
- Create MySQL database and update the credentials in headwind/config.php;
- Open the URL http://host.domain.com/headwind/init.php (replace host.domain.com to your domain name) and click "Initialize database" to create tables;
- The initialization script will show you URL of SMS sources and SMS handlers. Setup them
in Headwind GSM Modem Driver;
- Open the URL http://host.domain.com/headwind/index.php to check that the script is working.
How to use PHP class
To send SMS, include the class in your project, create the object of class HeadwindSMS,
call init() method to setup access to database, then call send() method to send SMS
(see the example in headwind/index.php).
To receive SMS, use the direct access to DB table headwind_inbox.
If you need to use multiple modems, run multiple instances of
Headwind GSM Modem Driver and use $source parameter of the PHP class methods..
Warning: do not forget to setup SMS sources and SMS handlers!