Ad Widget

Collapse

SMS and clickatell

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Wayne
    Junior Member
    • Oct 2006
    • 27

    #1

    SMS and clickatell

    Could anyone shed some insight if the script at the following URL info is accurate?
    http://www.zabbix.com/wiki/doku.php?id=howto:smsapi

    I can see it was recently added, but I have tried duplicating this script on a CentOS machine w/ PHP4, and sending a test message does not yield any results at all. Would be great to use something this simple and be able to send SMS from Zabbix.

    Any help is appreciated
  • Wayne
    Junior Member
    • Oct 2006
    • 27

    #2
    Doesn't it figure after I posted this that I went through the PHP code and found what the issue was. The wiki parsed => in the foreach() as one symbol.

    Comment

    • ranilib
      Junior Member
      • Oct 2007
      • 3

      #3
      Simple script

      I wrote the following script:

      Code:
      root@nms01:/etc/zabbix/alert.d# cat sms_clickatel.sh 
      #! /bin/sh
      
      /usr/bin/wget --spider --no-check-certificate "https://api.clickatell.com/http/sendmsg?api_id=<your_api_id>&user=<your_username>&password=<your_password>&from=<From_Text>&to=$1&text=$2"
      --
      Ran.

      Comment

      • pram
        Junior Member
        • Nov 2008
        • 2

        #4
        cannot get this script to work

        I try and run this script but it keeps coming up with

        http://www.zabbix.com/wiki/doku.php?id=howto:smsapi

        ./smsclickatell
        PHP Parse error: syntax error, unexpected T_VARIABLE in /etc/zabbix/scripts/smsclickatell on line 38

        here is line 37 and 38

        $url="http://api.clickatell.com/http/sendmsg?";
        foreach($apiargsas$k=>$v)$url.="$k=".urlencode($v) ."&";

        what is wrong with this, can anyone help pls !!

        Comment

        Working...