I have the following script which alerts to my gsm gateway and sends sms out.
Problem is, I can't seem to set the variables from zabbix eg $1 or $to etc
Does anybody know how to set these in 3.2?
Problem is, I can't seem to set the variables from zabbix eg $1 or $to etc
Does anybody know how to set these in 3.2?
Code:
#!/usr/bin/php -q
<?php
function SendSMS()
{
// 1. Initialize an CURL session.
$ch = curl_init();
// 2. Set parameters
$address = "http://10.1.3.100:80/sendsms?username=smsuser&password=SMSU53r&phonenumber=XXXXXXX&message=XXXXXXX&port=gsm-1.4&report=String&timeout=10";
//3.Setting the request options, including specific URL.
curl_setopt($ch,CURLOPT_URL,$address);
// 4. Execute a CURL session and get the reply.
$response = curl_exec($ch);
// 5.Release the Curl handle and close the CURL session.
curl_close($ch);
}
SendSMS();
?>