[solved] Manage Custom Handler Variables

Hi Everyone,

My first post here after discovering this awesome script for Kannel.

I am using Manage Custom to post to a URL: http://127.0.0.1/sos.php?sender={SMSSENDER} this works because on the sos.php script i am making it send a SMS using http method after it has done what i wanted it to do with the raspberry pi GPIO but with the mobile number typed in manually so it is 95% working but for some reason it will not use the number from who triggered the Manage Custom.

In all what is the variable i need to use because i have tried everything i can think of

  1. $_GET[sender];
  2. $_GET[‘sender’];
  3. $_GET[“sender”];
  4. $sender = $_GET[sender];
  5. ‘.$sender.’
  6. '.$_GET[sender].'
    and loads more,

I am using the http method using curl but will not use the variable

sos.php

<?php $sender = $_GET['sender']; $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, "http://127.0.0.1:13131/cgi-bin/sendsms?user=admin&pass=********&to=$sender&text=Arm%20Approved!!!&from=********$ curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); $output = curl_exec($ch); curl_close($ch); ?>

I look forward to some genius reply

Hi

Change the _GET to _POST, sms custom is using http post

Anton

I just tried that has you typed it lol fantastic stuff WORKS!, why would it be a POST instead of a GET?

no particular reason

anton