#!/usr/local/bin/php
<?php
/*
* smsclickatell
*
* A simple script to send an SMS via
* www.clickatell.com.
*
*
*/
Set the following three values:
$apiid = “221111”;
$user = “username”;
$password = “password”;
Do not change anything beneath this line:
if ($_SERVER[”argc”]<3) {
die (”Usage: “.$_SERVER[”argv”][0].” recipientmobilenumber message\n”);
}
$apiargs = array();
$apiargs[”api_id”]=$apiid;
$apiargs[”user”]=$user;
$apiargs[”password”]=$password;
$apiargs[”to”]=$_SERVER[”argv”][1];
$apiargs[”text”]=$_SERVER[”argv”][2];
$apiargs[”from”]=”Zabbix”;
$apiargs[”req_feat”]=32;
$url = “http://api.clickatell.com/http/sendmsg?”;
foreach ($apiargs as $k⇒$v) $url.=”$k=”.urlencode($v).”&”;
@file_get_contents($url);