Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.php > #14961

Re: help smsgateway.me

From Denis McMahon <denismfmcmahon@gmail.com>
Newsgroups comp.lang.php
Subject Re: help smsgateway.me
Date 2015-02-22 02:06 +0000
Organization A noiseless patient Spider
Message-ID <mcbdjc$rp4$1@dont-email.me> (permalink)
References <f5e1168b-3b9f-4abf-b2dc-eb26146d21f4@googlegroups.com> <c9ee7df5-7f4a-4c9d-825e-2f654954dd00@googlegroups.com>

Show all headers | View raw


On Sat, 21 Feb 2015 08:36:47 -0800, Adnan Shiekh wrote:

> i have know about how to fetch single which one sent from my android
> phone but i have not any issue about sending message only problem in
> receiving sms. any one can tell me how to receive sms using this api.. i
> have try to add callbacks "Message is received" but not working.... if
> any body know about the better approach for this api or solution of
> receiving message please tell me.. thanks

It looks like the callback is meant to be a page on your web server that 
the smsgateway.me requests to inform you that there is a message.

You want a php script on your webserver that might contain something like 
the following code:

<?php

$mysecret = '<your api callback secret>';

if ($_POST['secret'] == $mysecret) {

  switch($_POST['event']) {

    case 'Received': 
      // an sms was received
      // process received message
      break;

    case 'Sent':
      // an sms was sent
      break;

    case 'Update':
      // there was an update
      break;

    default:
      // this should never happen
      error_log('bad api callback event received in smscallback.php', 0);
  }

}
else {
  // record in your log that the secret was wrong
  error_log('bad api callback secret received in smscallback.php', 0);
}

Then you log in to your account at smsgateway.me, you go to the events 
page, you set up a callback event for received messages, you use the http 
method, you set the secret to <your api callback secret> and you set the 
http url to http://your-web-server-address/path/to/smscallback.php

This will inly work if the smsgateway.me server can connect to 

http://your-web-server-address/path/to/smscallback.php

If you are working from home with dynamic ip on adsl you will have all 
sorts of network configuration issues to resolve, none of which are 
relevant to the php newsgroup.

-- 
Denis McMahon, denismfmcmahon@gmail.com

Back to comp.lang.php | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

help smsgateway.me Adnan Shiekh <adnanshahi123@gmail.com> - 2015-02-20 14:56 -0800
  Re: help smsgateway.me Jerry Stuckle <jstucklex@attglobal.net> - 2015-02-20 19:25 -0500
    Re: help smsgateway.me Denis McMahon <denismfmcmahon@gmail.com> - 2015-02-21 03:42 +0000
      Re: help smsgateway.me Jerry Stuckle <jstucklex@attglobal.net> - 2015-02-20 22:52 -0500
        Re: help smsgateway.me Denis McMahon <denismfmcmahon@gmail.com> - 2015-02-21 06:36 +0000
        Re: help smsgateway.me Allodoxaphobia <knock_yourself_out@example.net> - 2015-02-21 19:25 +0000
  Re: help smsgateway.me Adnan Shiekh <adnanshahi123@gmail.com> - 2015-02-20 22:44 -0800
    Re: help smsgateway.me "J.O. Aho" <user@example.net> - 2015-02-21 09:58 +0100
  Re: help smsgateway.me Adnan Shiekh <adnanshahi123@gmail.com> - 2015-02-21 08:36 -0800
    Re: help smsgateway.me Jerry Stuckle <jstucklex@attglobal.net> - 2015-02-21 12:58 -0500
    Re: help smsgateway.me Denis McMahon <denismfmcmahon@gmail.com> - 2015-02-22 02:06 +0000
  Re: help smsgateway.me Adnan Shiekh <adnanshahi123@gmail.com> - 2015-02-22 07:25 -0800
    Re: help smsgateway.me khurram@itlinkonline.com - 2017-06-30 23:26 -0700
      Re: help smsgateway.me "J.O. Aho" <user@example.net> - 2017-07-01 08:34 +0200
      Re: help smsgateway.me denispeterson96@gmail.com - 2018-05-18 23:53 -0700
  Re: help smsgateway.me nguyenphuthuybk@gmail.com - 2019-02-22 01:13 -0800
    Re: help smsgateway.me Jerry Stuckle <jstucklex@attglobal.net> - 2019-02-22 09:35 -0500
  Re: help smsgateway.me qlixess@gmail.com - 2019-05-19 21:16 -0700
    Re: help smsgateway.me Jerry Stuckle <jstucklex@attglobal.net> - 2019-05-20 14:44 -0400
      Re: help smsgateway.me qlixess@gmail.com - 2019-05-20 09:01 -0700
        Re: help smsgateway.me Jerry Stuckle <jstucklex@attglobal.net> - 2019-05-20 16:07 -0400
          Re: help smsgateway.me qlixess@gmail.com - 2019-05-20 09:20 -0700
            Re: help smsgateway.me Jerry Stuckle <jstucklex@attglobal.net> - 2019-05-20 19:57 -0400
              Re: help smsgateway.me qlixess@gmail.com - 2019-05-20 15:54 -0700
                Re: help smsgateway.me Martin Gregorie <martin@mydomain.invalid> - 2019-05-20 23:15 +0000
                Re: help smsgateway.me qlixess@gmail.com - 2019-05-20 17:45 -0700
                Re: help smsgateway.me Jerry Stuckle <jstucklex@attglobal.net> - 2019-05-21 02:09 -0400
                Re: help smsgateway.me andrepinote01@gmail.com - 2019-06-11 12:09 -0700
                Re: help smsgateway.me Jerry Stuckle <jstucklex@attglobal.net> - 2019-06-12 10:32 -0400
                Re: help smsgateway.me qlixess@gmail.com - 2019-06-12 11:32 -0700
                Re: help smsgateway.me tim.soladoye@gmail.com - 2019-06-14 22:08 -0700
                Re: help smsgateway.me dhakamoto@gmail.com - 2019-06-28 09:28 -0700
                Re: help smsgateway.me Jerry Stuckle <jstucklex@attglobal.net> - 2019-06-28 23:17 -0400
                Re: help smsgateway.me tim.soladoye@gmail.com - 2019-07-28 00:32 -0700
                Re: help smsgateway.me "J.O. Aho" <user@example.net> - 2019-07-28 11:45 +0200
                Re: help smsgateway.me tim.soladoye@gmail.com - 2019-07-28 10:26 -0700
                Re: help smsgateway.me Lew Pitcher <lew.pitcher@digitalfreehold.ca> - 2019-07-28 14:13 -0400
                Re: help smsgateway.me tim.soladoye@gmail.com - 2019-07-28 14:28 -0700
                Re: help smsgateway.me Arno Welzel <usenet@arnowelzel.de> - 2019-07-29 10:17 +0200
                Re: help smsgateway.me tim.soladoye@gmail.com - 2019-07-29 01:29 -0700
                Re: help smsgateway.me Arno Welzel <usenet@arnowelzel.de> - 2019-07-29 15:26 +0200
                Re: help smsgateway.me tim.soladoye@gmail.com - 2019-07-29 06:39 -0700
                Re: help smsgateway.me Jerry Stuckle <jstucklex@attglobal.net> - 2019-07-29 10:38 -0400
                Re: help smsgateway.me tim.soladoye@gmail.com - 2019-07-29 09:54 -0700
                Re: help smsgateway.me "J.O. Aho" <user@example.net> - 2019-07-29 19:42 +0200
                Re: help smsgateway.me tim.soladoye@gmail.com - 2019-07-29 10:52 -0700
                Re: help smsgateway.me "J.O. Aho" <user@example.net> - 2019-07-29 20:28 +0200
                Re: help smsgateway.me Jerry Stuckle <jstucklex@attglobal.net> - 2019-07-29 23:21 -0400
                Re: help smsgateway.me Jerry Stuckle <jstucklex@attglobal.net> - 2019-07-29 23:23 -0400
                Re: help smsgateway.me bolfem1771@gmail.com - 2019-07-29 21:53 -0700
                Re: help smsgateway.me "J.O. Aho" <user@example.net> - 2019-07-30 07:15 +0200
                Re: help smsgateway.me Jerry Stuckle <jstucklex@attglobal.net> - 2019-07-30 10:50 -0400
                Offtopic: kdeconnect/adb (Was: help smsgateway.me) "J.O. Aho" <user@example.net> - 2019-07-30 19:40 +0200
                Re: help smsgateway.me tim.soladoye@gmail.com - 2019-07-29 22:00 -0700
                Re: help smsgateway.me Arno Welzel <usenet@arnowelzel.de> - 2019-07-30 11:55 +0200
                Re: help smsgateway.me Jerry Stuckle <jstucklex@attglobal.net> - 2019-07-30 10:52 -0400
                Re: help smsgateway.me Arno Welzel <usenet@arnowelzel.de> - 2019-07-30 11:53 +0200
                Re: help smsgateway.me Arno Welzel <usenet@arnowelzel.de> - 2019-07-30 11:51 +0200
        Re: help smsgateway.me dimitri.lekien@visitonweb.com - 2019-05-20 09:10 -0700
          Re: help smsgateway.me qlixess@gmail.com - 2019-05-20 09:19 -0700

csiph-web