SMS Server Tools 3
This site is hosted by Kekekasvi.com
 Menu
Basic information:
Additional information:
Support:
Get SMS Server Tools 3:
Additional Options

 Sponsored links

 Search
Custom Search

 Visitor locations
 
 SMS Server Tools 3 Community
Welcome, Guest. Please login or register. Sun Oct 25, 2020 16:09
SMSTools3 Community » Help and support Bottom

[answered] Use eventhandler to extract message headers into wget GET URL

Login and Post Reply

Page:  1

Author Post
Member
Registered:
Dec 2010
Location: United States of America
Operating system name and version: Ubuntu 12.04.1 LTS
Version of smsd: 3.1.15
Smsd installed from: This site
Name and model of a modem / phone: Option ICON 322
Interface: USB

Towards the end of this event handler I want to put the date, time stamp and modem in the GET part of the URL string along with the from number and message.




Administrator
Registered:
May 2009
Location: Jyväskylä, Finland
All headers from the message file are available in the array, so you could use something like this:

if ($sms_type == "RECEIVED")
{
  $to_exec = "wget -q \"http://localhost/sms/index.php"
             ."?sender=" .$sms_headers['From']
             ."&received=" .$sms_headers['Received']
             ."&modem=" .$sms_headers['Modem']
             ."&message=" .urlencode($sms_message_body)
             ."\" -O /dev/null";
  exec($to_exec);

}
 
'php' Syntax Highlight powered by GeSHi


Login and Post Reply

Page:  1

SMSTools3 Community » Help and support Top

 
Time in this board is UTC.  

Privacy Policy   SMS Server Tools 3 Copyright © Keijo Kasvi.