HTTP Client Plugin

Reciving SMS messages and sending a reply

Web applications communicate with the user with HTML forms. When a user wants to send information to the server, he fills out a form. The HTTP-SMS client plugin does the same. It fills out a form automatically every time an SMS message is received. The receiving web application can return a response SMS message after processing the received data.

reciving sms and sending a reply
Figure 1 - Reciving sms messages and sending a reply

Installation

To use the features of the HTTP client plugin, you need to install it first then you need to configure it. In order to perform the installation, please click on the "Install plugins" menu item.

how to install plugins to the ozeki sms server
Figure 2 - Installing plugins to the Ozeki SMS Server

After the plugin has been installed you can configure it by selecting the newly created menu item: "HTTP Client Configuration". On the configuration form, you can enter the HTTP URL that will be called when an incoming message arrives. If this URL starts with https://, the communication between Ozeki SMS and your web server will be encripted.

ozeki sms server http client configuration
Figure 3 - Http client configuration

After the configuration is done you can create a server side application on your web server to handle the incoming messages. You can find two examples for such applications on this page:

PHP example

http://localhost/smsproc.php

<?php
$sender       =
$_REQUEST['sender'] ;
$receiver     =  
$_REQUEST['receiver'];

$message      = $_REQUEST['msg'];
$receivedtime =  
$_REQUEST['recvtime'];

/* do some processing here */
  
if ($fp =
fopen("smslog.txt","a")) {   
fwrite($fp,"$receivedtime $sender $receiver $message\n");
fclose($fp);
}

/* return a response SMS */
print "{GSMSMS}{}{}{".$sender."}{Thank you for your SMS! WWW.OZEKI.HU}\n";

/* send the message to another phone */
print "{GSMSMS}{}{}{+36205552245}{".$sender." ".$message."}\n";
?>
	

Code 1 - Server side application to handle the incoming messages in PHP

ASP example

<%
Dim strMsg
Dim strSender

' Retrieve the posted items from the HTTP-SMS gateway
strMsg =  
Request.Form("msg")
strSender = Request.Form("sender")
strReceiver = Request.Form("receiver")
strTime = Request.Form("recvtime")

' Do some processing here

'Return a response SMS
Response.Write("{GSMSMS}{}{}{" & strSender & "}{Thank you for your SMS!}"& chr(13))

'send the message to another phone
  
Response.Write("{GSMSMS}{}{}{+36209937723}{" & strMsg &
"}"&
chr(13))
%>
	

Code 2 - Server side application to handle the incoming messages in ASP

More information