Sponsored Content
Top Forums Web Development Display received sms on webpage - php Post 302960279 by baris35 on Friday 13th of November 2015 05:25:40 AM
Old 11-13-2015
Display received sms on webpage - php

Hello,
Scenario: Send sms from putty and display it on webpage.

I have rented an short message service from a company and set callback url to my vps. PHP is installed in my vps .

my mobile phone is: ********85**
receipent mobile phone is: 49*********

callback url is redirected to http://my_vps_ip/sms/ at customer panel dashboard and succesfully accepted by their system.


When I enter below code in vps terminal,

Code:
curl 'https://rest.nexmo.com/sms/json' -d api_key=******** -dapi_secret=******** -d to=49********* --data-urlencode "text=Hello There!." -d from=********85**

I receive a new log line in apache.log and it confirms that sms received from the receiver's end but I am unable to play it on a webpage.
Could you please lead me how to do this?

apache.log
Code:
[13/Nov/2015:11:04:28 +0100] "GET /sms/?msisdn=********85**&to=49*********&messageId=0200000088D018F5&text=Hello There!.&type=text&keyword=HELLO&message-timestamp=2015-11-13+10%3A04%3A28 HTTP/1.1" 200 907 "-" "Nexmo/MessagingHUB/v1.0"


Thanks in advance
Boris
 

9 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

PHP:display by date

Can php + MySQL display stuff out of table by its date.? e.g. In a table have id, date, title, details can php display the info three weeks before the date in the db? What fuction would i use? (3 Replies)
Discussion started by: perleo
3 Replies

2. Shell Programming and Scripting

Calling an Expect script from a Webpage using PHP

I have a webpage that is in HTML and PHP. In PHP I have tried using exec, system, shell_exec and passthru functions to call an Expect Script file (temp.exp). This Expect file spawns a telnet session that uses "expect/send" commands to retrieve information from an environmental unit (not a normal... (0 Replies)
Discussion started by: CCUSmith
0 Replies

3. Web Development

php script + not displaying webpage

Hi guys Im in the process of designing a website for my company which does the following 1) Daily execution a perl script. The perl script's output is diverted to a .html file. 2) The .html file generated from 1) sets up a centralised webpage showing options as radio buttons (the radio... (1 Reply)
Discussion started by: JamesGoh
1 Replies

4. Web Development

[php] webpage with login & mysql-db

Hi all, What I was looking for before was a multi-user password manager, web-based! The offer of free or cheap tools of this kind is very pover. Or they are too complex (or too expensive) I'm not a web programmer but I now decided to set up a (php) website with login and based on this login... (1 Reply)
Discussion started by: thibautp
1 Replies

5. Linux

Run PHP script when new email received

I have been looking around for a solution to this, i have been developing for a wile though am very new to CGI, PHP and a lot of the web based tech. I have a web site hosted with a cPanel web host. I am looking to have a script(prefer PHP) to run everytime i get a new email to help@xxx.com.... (16 Replies)
Discussion started by: iKris
16 Replies

6. Solaris

Webpage Display

Hi, I need to display the output of a script in web page. Can anyone suggest me how to do that? (5 Replies)
Discussion started by: Arasu
5 Replies

7. UNIX for Dummies Questions & Answers

How to submit form on an php webpage from command line?

Hello, i have page domain.com/form.php the form fields on form.php are named: name=ipaddress name=port and submit button is named: submit i want to ask how the linux command will look like to submit the form filled with: ipaddress: 127.0.0.1 port: 80 I tried various curl and... (5 Replies)
Discussion started by: postcd
5 Replies

8. Shell Programming and Scripting

Executing Shell Script from PHP Webpage

Hello , I am trying to execute a small shell script from a PHP Webpage. Below is the shell script : 1.sh $ cat /home/oracle/rahul/1.sh #!/bin/ksh echo "`date` : Report generation in progress" > /home/oracle/rahul/report.txt echo "Run successfully script"; Below is the PHP... (1 Reply)
Discussion started by: rahul2662
1 Replies

9. Shell Programming and Scripting

Running php index.php as shell in webpage

so i have a bit of a unique situation. i have an encrypted index.php file that that can't be run the normal way that a web browser would run it. if it is run the normal way, the php script will show only gibberish on the web browser, instead of the actual php code. when run from the command... (8 Replies)
Discussion started by: SkySmart
8 Replies
smsd(8) 							      Gnokii								   smsd(8)

NAME
smsd - daemon for handling incoming and outgoing SMSes using libgnokii SYNOPSIS
smsd [OPTIONS] DESCRIPTION
The SMSD (SMS daemon) program is intended for receiving and sending SMSes. The program is designed to use modules (plugins) to work with different backends. Currently are supported PostgreSQL, MySQL and a special module 'file' which is designed to work without an SQL database (see below for special instructions in the file module section). When SMSD uses an SQL server as a repository for SMSes you must create a database (default name is 'sms') with tables defined in sms.tables.{mod- ule}.sql files. Table 'inbox' is for received SMSes. SMSD periodically checks a given phone memory to move messages to this table. Only received SMSes and status reports are deleted from the phone, other kinds of messages are not removed. Table 'inbox' has the following fields: number phone number from which is sms received smsdate date set by SMS center insertdate date SMS was inserted into table text SMS text phone number of phone to use. If you use smsd without -t option you can ignore this column. See -t option below. processed smsd sets this always to FALSE. You can use it for another program which will parse SMSes. Table 'outbox' is for outgoing SMSes. SMSD periodically looks into this table and searches for lines with attribute 'processed' set to FALSE. If it finds such SMS, it will send SMS to 'number'. Table 'outbox' has the following fields: number recipient's phone number processed_date date of processing SMS. insertdate date of inserting SMS in table text SMS text phone number of phone to use. If you use smsd without -t option you must not fill this column. See -t option below. processed new SMS must have this attribute set to FALSE. SMSD will send this SMS and will update 'processed' to TRUE. error This attribute contains return value of gn_sms_send() function. For explanation of numeric values see <gnokii/error.h> in gnokii source. dreport request for delivery report per message. Possible values are 0 for no delivery report, 1 for delivery report. not_before sms will not be sent before this time (default 00:00:00). not_after sms will not be sent after this time (default 23:59:59). SMSD is multi threaded program. If you list processes you will see more than one instance of smsd. THE FILE MODULE This module doesn't need an SQL server to work. For incoming messages it works in a way that it calls a program giving phone number, date as parameter and the message text on stdin. In the smsd directory there is an example file action. It shows sms data to stdout. If you want something useful you must write your own action. For outgoing messages you can set spool directory where smsd looks regularly. Incoming sms are passed in format action number date < sms Outgoing sms must be in format: number text The name of file is unimportant but smsd ignores all files with prefix "ERR.". If smsd succesfully sends sms, it removes file from spool directory. If smsd cannot send sms prepends file with "ERR." prefix and ignores it. If you use -m file, -u (--user) and -c (--host) will have other meaning. -u is for action (action must be executable) -c is for spool directory where smsd looks for smses. Smsd must have read and write permissions to this directory. -p, -d parameters have no meaning when -m file is used. If you don't specify -u, default action is to print sms to stdout. If you don't specify -c, sms sending will be disabled. OPTIONS Available options: -u, --user db_username Specify user name. -p, --password db_password Specify user password. -d, --db db_name Specify database name for 'pq' and 'mysql' modules or full path to database file for 'sqlite' module (defaults to 'sms'). -c, --host db_hostname Specify database server host name. -s, --schema db_hostname Specify database schema used by the PostgreSQL module (defaults to 'public'). -m, --module db_module Specify which module to use for connection to DB server. Currently supported values are 'pq' for PostgreSQL, 'mysql' for MySQL, 'sqlite' for SQLite3 and 'file'. File module is not supported in Windows. -l, --libdir path_to_db_module Specify path to DB modules. If you specify pq module, smsd searches in libdir for file libsmsd_pq.so (for mysql - libsmsd_mysql.so). Do not interchange these plugins with default SQL libraries from database distribution! -f, --logfile file If used, smsd will monitor sms traffic to file "file". File is reopened and closed for every message so you can simply rename or delete it if you want to rotate logs. If you use '-' as filename smsd will use standard output. -t, --phone phone_number You can run more instances of smsd. One instance per phone. In this setup you must configure phone section in the config file. For example: [global] port = /dev/ttyS0 model = 6110 initlength = default connection = serial bindir = /usr/local/sbin/ use_locking = no serial_baudrate = 38400 smsc_timeout = 10 [phone_1] port = /dev/ttyS0 model = 6110 initlength = default connection = serial bindir = /usr/local/sbin/ use_locking = no serial_baudrate = 38400 [phone_2] port = /dev/ttyS1 model = AT initlength = default connection = serial bindir = /usr/local/sbin/ use_locking = no serial_baudrate = 38400 smsc_timeout = 10 In this setup if you run smsd without -t option it will use config from global section. If you run smsd with -t 1 it will use config from phone_1 and likewise with -t 2 uses phone_2. In case of use -t option smsd fills phone number for incoming sms's and in outbox it looks only for sms's with the specified phone number in column 'phone'. This behaviour gives you possibility to run one instance of smsd for every phone you have at the same time. -i, --interval interval Polling interval for incoming sms's in seconds. Default is 1 second. -S, --maxsms number When phone driver doesn't support sms status it is possible to specify number of sms's supported by phone. Default is 10. If driver support sms status this option is ignored. -b, --inbox memory_type Where to look for new messages (defaults to IN for most Nokia phones and to SM for all other phones). For debugging or for unusual setups you can use another memory type supported by your phone (eg. IN for the Inbox, OU for the Outbox, AR for the Archive, TE for the Templates and F1,...,F20 for your own folders). Use gnokii --showsmsfolderstatus for a list of such memory types. -0, --firstpos0 SMSD starts messages reading from position 1. If your phone stores sms's from postion 0, use this option. -v, --version Shows smsd version. -h, --help Shows short help. DIAGNOSTICS
Various error messages are printed to STDERR. Debug output can be enabled setting xdebug=on (for messages specific to SMSD) and debug=on (for messages specific to libgnokii) in the con- figuration file. BUGS
None reported. AUTHOR
SMSD was written by Jan Derfinak and contributed by other people. See also Docs/CREDITS from the Gnokii sources. COPYING
This program is distributed under the GNU Public License. SEE ALSO
gnokii(1) September 27, 2010 smsd(8)
All times are GMT -4. The time now is 07:51 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy