#!/usr/bin/php 0775, 'timeFormat' => '%X %x'); $logger = &Log::singleton('file', '/var/log/sms.log', 'ident', $logconf, $log_level); // Set the following three values: //$apiid="221111"; $apiid=""; $user=""; $password=""; // Do not change anything beneath this line: if($_SERVER["argc"]<3){ $logger->log("Usage: ".$_SERVER["argv"][0]." recipientmobilenumber message", PEAR_LOG_ERR); 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); $logger->log("Send sms to ".$apiargs["to"], PEAR_LOG_INFO); //print "$url\n"; ?>