Xymon Mailing List Archive search

receiving sms alerts...

list Metron 6 Six
Fri, 8 Sep 2017 17:17:14 +0300
Message-Id: <CA+MHGGj3_mwThNwuCbkP-s=p1_2Hr=jdh=U+Ua9aOn=y=user-36f870f1b949@xymon.invalid>

hello all,

i got a subscription to an SMS gateway, and the script they gave me is this:


*<?php*

        *// Simple SMS send function*

        *function* sendSMS($key, $to, $message, $originator) {

                $URL = *"https:**//smscenter.gr/api/sms/send?key=
<http://smscenter.gr/api/sms/send?key=>"; . $key . "&to=" . $to;*

                $URL .= *"&text="* . urlencode( $message ) . '&from=' .
urlencode( $originator );

                $fp = fopen( $URL, 'r' );

                return fread( $fp, 1024 );

        }

        *// Example of use*

        $response = sendSMS( 'myapikey', 'recipientnumber', 'My test
message', 'from' );

        echo $response;

*?>*

*-------*

*how could i implement it inside alerts.cfg in order to get sms alerts ?*


-- 

regards,
Metron 6 (six)

user-17e4b93d552a@xymon.invalid