ajout mode premium

This commit is contained in:
Alexis U (portable) 2016-03-15 15:11:52 +01:00
parent 57a01d27c5
commit 87a576642c
1 changed files with 15 additions and 2 deletions

View File

@ -46,17 +46,30 @@ class Octopush extends Core {
return false;
$testMode = false;
$highPriority = true;
if ($highPriority) {
$sms_type = 'FR';
$sms_sender = 'phpServerMon';
$sms_more = ' STOP au XXXXX';
}
else {
$sms_type = 'XXX';
$sms_more = '';
}
$recipients = urlencode(implode(',', $this->recipients));
$octopush_url = "https://www.octopush-dm.com/api/sms/";
$octopush_data = urlencode( $message );
$octopush_data = urlencode( $message . $sms_more );
$URL = $octopush_url. "?" .
"user_login=" . $this->username .
"&api_key=" . $this->password .
"&sms_recipients=" . $recipients .
"&sms_type=XXX" .
"&sms_type=" . $sms_type .
($testMode ? '&request_mode=simu' : '') .
(isset($sms_sender) ? '&sms_sender='.$sms_sender : '') .
"&sms_text=" . $octopush_data;
$result = file_get_contents( $URL );