Implement Nexmo SMS Issue #170
parent
93ddf5139b
commit
6a2a4c1898
|
@ -5,6 +5,7 @@ Changelog
|
||||||
not yet released
|
not yet released
|
||||||
----------------------------------
|
----------------------------------
|
||||||
|
|
||||||
|
* #170: Implement Nexmo SMS.
|
||||||
* #161: Added Swedish translation.
|
* #161: Added Swedish translation.
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -46,6 +46,7 @@ The following SMS gateways are currently available:
|
||||||
* SMSit - <http://www.smsit.dk/>
|
* SMSit - <http://www.smsit.dk/>
|
||||||
* Spryng - <http://www.spryng.nl>
|
* Spryng - <http://www.spryng.nl>
|
||||||
* Textmarketer - <http://www.textmarketer.co.uk>
|
* Textmarketer - <http://www.textmarketer.co.uk>
|
||||||
|
* Nexmo - <https://www.nexmo.com/>
|
||||||
|
|
||||||
Please note: for these gateways you will need an account with sufficient credits.
|
Please note: for these gateways you will need an account with sufficient credits.
|
||||||
|
|
||||||
|
|
|
@ -62,6 +62,10 @@ The following people have contributed to the development of PHP Server Monitor:
|
||||||
|
|
||||||
* Icon
|
* Icon
|
||||||
|
|
||||||
|
* Luis Rodriguez - https://github.com/ldrrp
|
||||||
|
|
||||||
|
* Nexmo SMS gateway
|
||||||
|
|
||||||
Translators
|
Translators
|
||||||
+++++++++++
|
+++++++++++
|
||||||
|
|
||||||
|
|
|
@ -55,6 +55,7 @@ The following SMS gateways are currently available:
|
||||||
* SMSit - <http://www.smsit.dk/>
|
* SMSit - <http://www.smsit.dk/>
|
||||||
* Spryng - <http://www.spryng.nl>
|
* Spryng - <http://www.spryng.nl>
|
||||||
* Textmarketer - <http://www.textmarketer.co.uk>
|
* Textmarketer - <http://www.textmarketer.co.uk>
|
||||||
|
* Nexmo - <https://www.nexmo.com/>
|
||||||
|
|
||||||
Please note: for these gateways you will need an account with sufficient credits.
|
Please note: for these gateways you will need an account with sufficient credits.
|
||||||
|
|
||||||
|
@ -62,4 +63,4 @@ Please note: for these gateways you will need an account with sufficient credits
|
||||||
Download
|
Download
|
||||||
++++++++
|
++++++++
|
||||||
|
|
||||||
The latest version can be downloaded from http://www.phpservermonitor.org/.
|
The latest version can be downloaded from http://www.phpservermonitor.org/.
|
||||||
|
|
|
@ -466,6 +466,9 @@ function psm_build_sms() {
|
||||||
case 'smsglobal':
|
case 'smsglobal':
|
||||||
$sms = new \psm\Txtmsg\Smsglobal();
|
$sms = new \psm\Txtmsg\Smsglobal();
|
||||||
break;
|
break;
|
||||||
|
case 'nexmo':
|
||||||
|
$sms = new \psm\Txtmsg\Nexmo();
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
// copy login information from the config file
|
// copy login information from the config file
|
||||||
|
|
|
@ -195,6 +195,7 @@ $sm_lang = array(
|
||||||
'sms_gateway_clickatell' => 'Clickatell',
|
'sms_gateway_clickatell' => 'Clickatell',
|
||||||
'sms_gateway_textmarketer' => 'Textmarketer',
|
'sms_gateway_textmarketer' => 'Textmarketer',
|
||||||
'sms_gateway_smsglobal' => 'SMSGlobal',
|
'sms_gateway_smsglobal' => 'SMSGlobal',
|
||||||
|
'sms_gateway_nexmo' => 'Nexmo',
|
||||||
'sms_gateway_username' => 'Потребител',
|
'sms_gateway_username' => 'Потребител',
|
||||||
'sms_gateway_password' => 'Парола',
|
'sms_gateway_password' => 'Парола',
|
||||||
'sms_from' => 'Номер на изпращача',
|
'sms_from' => 'Номер на изпращача',
|
||||||
|
|
|
@ -192,8 +192,9 @@ $sm_lang = array(
|
||||||
'sms_gateway_spryng' => 'Spryng',
|
'sms_gateway_spryng' => 'Spryng',
|
||||||
'sms_gateway_inetworx' => 'Inetworx',
|
'sms_gateway_inetworx' => 'Inetworx',
|
||||||
'sms_gateway_clickatell' => 'Clickatell',
|
'sms_gateway_clickatell' => 'Clickatell',
|
||||||
'sms_gateway_textmarketer' => 'Textmarketer',
|
'sms_gateway_textmarketer' => 'Textmarketer',
|
||||||
'sms_gateway_smsglobal' => 'SMSGlobal',
|
'sms_gateway_smsglobal' => 'SMSGlobal',
|
||||||
|
'sms_gateway_nexmo' => 'Nexmo',
|
||||||
'sms_gateway_smsit' => 'Smsit',
|
'sms_gateway_smsit' => 'Smsit',
|
||||||
'sms_gateway_username' => 'Uživatelské jméno brány',
|
'sms_gateway_username' => 'Uživatelské jméno brány',
|
||||||
'sms_gateway_password' => 'Heslo brány',
|
'sms_gateway_password' => 'Heslo brány',
|
||||||
|
|
|
@ -195,6 +195,7 @@ $sm_lang = array(
|
||||||
'sms_gateway_textmarketer' => 'Textmarketer',
|
'sms_gateway_textmarketer' => 'Textmarketer',
|
||||||
'sms_gateway_smsglobal' => 'SMSGlobal',
|
'sms_gateway_smsglobal' => 'SMSGlobal',
|
||||||
'sms_gateway_smsit' => 'Smsit',
|
'sms_gateway_smsit' => 'Smsit',
|
||||||
|
'sms_gateway_nexmo' => 'Nexmo',
|
||||||
'sms_gateway_username' => 'Gateway brugernavn/apikey',
|
'sms_gateway_username' => 'Gateway brugernavn/apikey',
|
||||||
'sms_gateway_password' => 'Gateway adgangskode',
|
'sms_gateway_password' => 'Gateway adgangskode',
|
||||||
'sms_from' => 'Afsenders navn.',
|
'sms_from' => 'Afsenders navn.',
|
||||||
|
|
|
@ -195,6 +195,7 @@ $sm_lang = array(
|
||||||
'sms_gateway_textmarketer' => 'Textmarketer',
|
'sms_gateway_textmarketer' => 'Textmarketer',
|
||||||
'sms_gateway_smsglobal' => 'SMSGlobal',
|
'sms_gateway_smsglobal' => 'SMSGlobal',
|
||||||
'sms_gateway_smsit' => 'Smsit',
|
'sms_gateway_smsit' => 'Smsit',
|
||||||
|
'sms_gateway_nexmo' => 'Nexmo',
|
||||||
'sms_gateway_username' => 'Gateway Benutzername',
|
'sms_gateway_username' => 'Gateway Benutzername',
|
||||||
'sms_gateway_password' => 'Gateway Passwort',
|
'sms_gateway_password' => 'Gateway Passwort',
|
||||||
'sms_from' => 'SMS-Sendernummer',
|
'sms_from' => 'SMS-Sendernummer',
|
||||||
|
|
|
@ -192,9 +192,10 @@ $sm_lang = array(
|
||||||
'sms_gateway_spryng' => 'Spryng',
|
'sms_gateway_spryng' => 'Spryng',
|
||||||
'sms_gateway_inetworx' => 'Inetworx',
|
'sms_gateway_inetworx' => 'Inetworx',
|
||||||
'sms_gateway_clickatell' => 'Clickatell',
|
'sms_gateway_clickatell' => 'Clickatell',
|
||||||
'sms_gateway_textmarketer' => 'Textmarketer',
|
'sms_gateway_textmarketer' => 'Textmarketer',
|
||||||
'sms_gateway_smsglobal' => 'SMSGlobal',
|
'sms_gateway_smsglobal' => 'SMSGlobal',
|
||||||
'sms_gateway_smsit' => 'Smsit',
|
'sms_gateway_smsit' => 'Smsit',
|
||||||
|
'sms_gateway_nexmo' => 'Nexmo',
|
||||||
'sms_gateway_username' => 'Gateway username',
|
'sms_gateway_username' => 'Gateway username',
|
||||||
'sms_gateway_password' => 'Gateway password',
|
'sms_gateway_password' => 'Gateway password',
|
||||||
'sms_from' => 'Sender\'s phone number',
|
'sms_from' => 'Sender\'s phone number',
|
||||||
|
|
|
@ -193,9 +193,10 @@ $sm_lang = array(
|
||||||
'sms_gateway_spryng' => 'Spryng',
|
'sms_gateway_spryng' => 'Spryng',
|
||||||
'sms_gateway_inetworx' => 'Inetworx',
|
'sms_gateway_inetworx' => 'Inetworx',
|
||||||
'sms_gateway_clickatell' => 'Clickatell',
|
'sms_gateway_clickatell' => 'Clickatell',
|
||||||
'sms_gateway_textmarketer' => 'Textmarketer',
|
'sms_gateway_textmarketer' => 'Textmarketer',
|
||||||
'sms_gateway_smsglobal' => 'SMSGlobal',
|
'sms_gateway_smsglobal' => 'SMSGlobal',
|
||||||
'sms_gateway_smsit' => 'Smsit',
|
'sms_gateway_smsit' => 'Smsit',
|
||||||
|
'sms_gateway_nexmo' => 'Nexmo',
|
||||||
'sms_gateway_username' => 'Gateway username',
|
'sms_gateway_username' => 'Gateway username',
|
||||||
'sms_gateway_password' => 'Gateway password',
|
'sms_gateway_password' => 'Gateway password',
|
||||||
'sms_from' => 'Número origen del SMS',
|
'sms_from' => 'Número origen del SMS',
|
||||||
|
|
|
@ -196,6 +196,7 @@ $sm_lang = array(
|
||||||
'sms_gateway_textmarketer' => 'Textmarketer',
|
'sms_gateway_textmarketer' => 'Textmarketer',
|
||||||
'sms_gateway_smsglobal' => 'SMSGlobal',
|
'sms_gateway_smsglobal' => 'SMSGlobal',
|
||||||
'sms_gateway_smsit' => 'Smsit',
|
'sms_gateway_smsit' => 'Smsit',
|
||||||
|
'sms_gateway_nexmo' => 'Nexmo',
|
||||||
'sms_gateway_username' => 'Nom utilisateur de la passerelle',
|
'sms_gateway_username' => 'Nom utilisateur de la passerelle',
|
||||||
'sms_gateway_password' => 'Mot de passe de la passerelle',
|
'sms_gateway_password' => 'Mot de passe de la passerelle',
|
||||||
'sms_from' => 'SMS de l\'expéditeur',
|
'sms_from' => 'SMS de l\'expéditeur',
|
||||||
|
|
|
@ -195,6 +195,7 @@ $sm_lang = array(
|
||||||
'sms_gateway_textmarketer' => 'Textmarketer',
|
'sms_gateway_textmarketer' => 'Textmarketer',
|
||||||
'sms_gateway_smsglobal' => 'SMSGlobal',
|
'sms_gateway_smsglobal' => 'SMSGlobal',
|
||||||
'sms_gateway_smsit' => 'Smsit',
|
'sms_gateway_smsit' => 'Smsit',
|
||||||
|
'sms_gateway_nexmo' => 'Nexmo',
|
||||||
'sms_gateway_username' => 'Nome Utente Gateway',
|
'sms_gateway_username' => 'Nome Utente Gateway',
|
||||||
'sms_gateway_password' => 'Password Gateway',
|
'sms_gateway_password' => 'Password Gateway',
|
||||||
'sms_from' => 'Numero di telefono del mittente',
|
'sms_from' => 'Numero di telefono del mittente',
|
||||||
|
|
|
@ -193,6 +193,7 @@ $sm_lang = array(
|
||||||
'sms_gateway_inetworx' => 'Inetworx',
|
'sms_gateway_inetworx' => 'Inetworx',
|
||||||
'sms_gateway_clickatell' => 'Clickatell',
|
'sms_gateway_clickatell' => 'Clickatell',
|
||||||
'sms_gateway_smsit' => 'Smsit',
|
'sms_gateway_smsit' => 'Smsit',
|
||||||
|
'sms_gateway_nexmo' => 'Nexmo',
|
||||||
'sms_gateway_textmarketer' => 'Textmarketer',
|
'sms_gateway_textmarketer' => 'Textmarketer',
|
||||||
'sms_gateway_smsglobal' => 'SMSGlobal',
|
'sms_gateway_smsglobal' => 'SMSGlobal',
|
||||||
'sms_gateway_username' => 'Gateway username',
|
'sms_gateway_username' => 'Gateway username',
|
||||||
|
|
|
@ -195,6 +195,7 @@ $sm_lang = array(
|
||||||
'sms_gateway_textmarketer' => 'Textmarketer',
|
'sms_gateway_textmarketer' => 'Textmarketer',
|
||||||
'sms_gateway_smsglobal' => 'SMSGlobal',
|
'sms_gateway_smsglobal' => 'SMSGlobal',
|
||||||
'sms_gateway_smsit' => 'Smsit',
|
'sms_gateway_smsit' => 'Smsit',
|
||||||
|
'sms_gateway_nexmo' => 'Nexmo',
|
||||||
'sms_gateway_username' => 'Gateway gebruikersnaam',
|
'sms_gateway_username' => 'Gateway gebruikersnaam',
|
||||||
'sms_gateway_password' => 'Gateway wachtwoord',
|
'sms_gateway_password' => 'Gateway wachtwoord',
|
||||||
'sms_from' => 'Telefoonnummer afzender',
|
'sms_from' => 'Telefoonnummer afzender',
|
||||||
|
|
|
@ -195,6 +195,7 @@ $sm_lang = array(
|
||||||
'sms_gateway_textmarketer' => 'Textmarketer',
|
'sms_gateway_textmarketer' => 'Textmarketer',
|
||||||
'sms_gateway_smsglobal' => 'SMSGlobal',
|
'sms_gateway_smsglobal' => 'SMSGlobal',
|
||||||
'sms_gateway_smsit' => 'Smsit',
|
'sms_gateway_smsit' => 'Smsit',
|
||||||
|
'sms_gateway_nexmo' => 'Nexmo',
|
||||||
'sms_gateway_username' => 'Login do bramki',
|
'sms_gateway_username' => 'Login do bramki',
|
||||||
'sms_gateway_password' => 'Hasło do bramki',
|
'sms_gateway_password' => 'Hasło do bramki',
|
||||||
'sms_from' => 'Numer nadawcy',
|
'sms_from' => 'Numer nadawcy',
|
||||||
|
|
|
@ -185,19 +185,20 @@ $sm_lang = array(
|
||||||
'email_smtp_username' => 'SMTP username',
|
'email_smtp_username' => 'SMTP username',
|
||||||
'email_smtp_password' => 'SMTP password',
|
'email_smtp_password' => 'SMTP password',
|
||||||
'email_smtp_noauth' => 'Deixe em branco para nenhuma autenticação',
|
'email_smtp_noauth' => 'Deixe em branco para nenhuma autenticação',
|
||||||
'sms_status' => 'Habilitar o envio de mensagem de texto?',
|
'sms_status' => 'Habilitar o envio de mensagem de texto?',
|
||||||
'sms_gateway' => 'Gateway para o uso de envio de mensagens',
|
'sms_gateway' => 'Gateway para o uso de envio de mensagens',
|
||||||
'sms_gateway_mosms' => 'Mosms',
|
'sms_gateway_mosms' => 'Mosms',
|
||||||
'sms_gateway_mollie' => 'Mollie',
|
'sms_gateway_mollie' => 'Mollie',
|
||||||
'sms_gateway_spryng' => 'Spryng',
|
'sms_gateway_spryng' => 'Spryng',
|
||||||
'sms_gateway_inetworx' => 'Inetworx',
|
'sms_gateway_inetworx' => 'Inetworx',
|
||||||
'sms_gateway_clickatell' => 'Clickatell',
|
'sms_gateway_clickatell' => 'Clickatell',
|
||||||
'sms_gateway_textmarketer' => 'Textmarketer',
|
'sms_gateway_textmarketer' => 'Textmarketer',
|
||||||
'sms_gateway_smsglobal' => 'SMSGlobal',
|
'sms_gateway_smsglobal' => 'SMSGlobal',
|
||||||
'sms_gateway_smsit' => 'Smsit',
|
'sms_gateway_smsit' => 'Smsit',
|
||||||
'sms_gateway_username' => 'Usuário do Gateway',
|
'sms_gateway_nexmo' => 'Nexmo',
|
||||||
'sms_gateway_password' => 'Senha do Gateway',
|
'sms_gateway_username' => 'Usuário do Gateway',
|
||||||
'sms_from' => 'Número de telefone de envio',
|
'sms_gateway_password' => 'Senha do Gateway',
|
||||||
|
'sms_from' => 'Número de telefone de envio',
|
||||||
'pushover_status' => 'Habilitar envio de mensagens Pushover',
|
'pushover_status' => 'Habilitar envio de mensagens Pushover',
|
||||||
'pushover_description' => 'Pushover é um serviço de notificações em tempo real. Veja <a href="https://pushover.net/">o website</a> para mais informações.',
|
'pushover_description' => 'Pushover é um serviço de notificações em tempo real. Veja <a href="https://pushover.net/">o website</a> para mais informações.',
|
||||||
'pushover_clone_app' => 'Clique aqui para criar sua app Pushover',
|
'pushover_clone_app' => 'Clique aqui para criar sua app Pushover',
|
||||||
|
|
|
@ -195,6 +195,7 @@ $sm_lang = array(
|
||||||
'sms_gateway_textmarketer' => 'Textmarketer',
|
'sms_gateway_textmarketer' => 'Textmarketer',
|
||||||
'sms_gateway_smsglobal' => 'SMSGlobal',
|
'sms_gateway_smsglobal' => 'SMSGlobal',
|
||||||
'sms_gateway_smsit' => 'Smsit',
|
'sms_gateway_smsit' => 'Smsit',
|
||||||
|
'sms_gateway_nexmo' => 'Nexmo',
|
||||||
'sms_gateway_username' => 'Пользователь',
|
'sms_gateway_username' => 'Пользователь',
|
||||||
'sms_gateway_password' => 'Пароль',
|
'sms_gateway_password' => 'Пароль',
|
||||||
'sms_from' => 'Номер отправителя',
|
'sms_from' => 'Номер отправителя',
|
||||||
|
|
|
@ -192,9 +192,10 @@ $sm_lang = array(
|
||||||
'sms_gateway_spryng' => 'Spryng',
|
'sms_gateway_spryng' => 'Spryng',
|
||||||
'sms_gateway_inetworx' => 'Inetworx',
|
'sms_gateway_inetworx' => 'Inetworx',
|
||||||
'sms_gateway_clickatell' => 'Clickatell',
|
'sms_gateway_clickatell' => 'Clickatell',
|
||||||
'sms_gateway_textmarketer' => 'Textmarketer',
|
'sms_gateway_textmarketer' => 'Textmarketer',
|
||||||
'sms_gateway_smsglobal' => 'SMSGlobal',
|
'sms_gateway_smsglobal' => 'SMSGlobal',
|
||||||
'sms_gateway_smsit' => 'Smsit',
|
'sms_gateway_smsit' => 'Smsit',
|
||||||
|
'sms_gateway_nexmo' => 'Nexmo',
|
||||||
'sms_gateway_username' => 'Gateway användarnamn',
|
'sms_gateway_username' => 'Gateway användarnamn',
|
||||||
'sms_gateway_password' => 'Gateway lösenord',
|
'sms_gateway_password' => 'Gateway lösenord',
|
||||||
'sms_from' => 'Avsändarens telefonnummer',
|
'sms_from' => 'Avsändarens telefonnummer',
|
||||||
|
|
|
@ -195,6 +195,7 @@ $sm_lang = array(
|
||||||
'sms_gateway_textmarketer' => 'Textmarketer',
|
'sms_gateway_textmarketer' => 'Textmarketer',
|
||||||
'sms_gateway_smsglobal' => 'SMSGlobal',
|
'sms_gateway_smsglobal' => 'SMSGlobal',
|
||||||
'sms_gateway_smsit' => 'Smsit',
|
'sms_gateway_smsit' => 'Smsit',
|
||||||
|
'sms_gateway_nexmo' => 'Nexmo',
|
||||||
'sms_gateway_username' => 'Servis kullanıcı adı',
|
'sms_gateway_username' => 'Servis kullanıcı adı',
|
||||||
'sms_gateway_password' => 'Servis şifresi',
|
'sms_gateway_password' => 'Servis şifresi',
|
||||||
'sms_from' => 'Gönderen numarası',
|
'sms_from' => 'Gönderen numarası',
|
||||||
|
|
|
@ -192,9 +192,10 @@ $sm_lang = array(
|
||||||
'sms_gateway_spryng' => 'Spryng',
|
'sms_gateway_spryng' => 'Spryng',
|
||||||
'sms_gateway_inetworx' => 'Inetworx',
|
'sms_gateway_inetworx' => 'Inetworx',
|
||||||
'sms_gateway_clickatell' => 'Clickatell',
|
'sms_gateway_clickatell' => 'Clickatell',
|
||||||
'sms_gateway_textmarketer' => 'Textmarketer',
|
'sms_gateway_textmarketer' => 'Textmarketer',
|
||||||
'sms_gateway_smsglobal' => 'SMSGlobal',
|
'sms_gateway_smsglobal' => 'SMSGlobal',
|
||||||
'sms_gateway_smsit' => 'Smsit',
|
'sms_gateway_smsit' => 'Smsit',
|
||||||
|
'sms_gateway_nexmo' => 'Nexmo',
|
||||||
'sms_gateway_username' => 'SMS网关用户名',
|
'sms_gateway_username' => 'SMS网关用户名',
|
||||||
'sms_gateway_password' => 'SMS网关密码',
|
'sms_gateway_password' => 'SMS网关密码',
|
||||||
'sms_from' => '发信人电话号',
|
'sms_from' => '发信人电话号',
|
||||||
|
|
|
@ -314,6 +314,7 @@ class ConfigController extends AbstractController {
|
||||||
'label_sms_gateway_textmarketer' => psm_get_lang('config', 'sms_gateway_textmarketer'),
|
'label_sms_gateway_textmarketer' => psm_get_lang('config', 'sms_gateway_textmarketer'),
|
||||||
'label_sms_gateway_smsit' => psm_get_lang('config', 'sms_gateway_smsit'),
|
'label_sms_gateway_smsit' => psm_get_lang('config', 'sms_gateway_smsit'),
|
||||||
'label_sms_gateway_smsglobal' => psm_get_lang('config', 'sms_gateway_smsglobal'),
|
'label_sms_gateway_smsglobal' => psm_get_lang('config', 'sms_gateway_smsglobal'),
|
||||||
|
'label_sms_gateway_nexmo' => psm_get_lang('config', 'sms_gateway_nexmo'),
|
||||||
'label_sms_gateway_username' => psm_get_lang('config', 'sms_gateway_username'),
|
'label_sms_gateway_username' => psm_get_lang('config', 'sms_gateway_username'),
|
||||||
'label_sms_gateway_password' => psm_get_lang('config', 'sms_gateway_password'),
|
'label_sms_gateway_password' => psm_get_lang('config', 'sms_gateway_password'),
|
||||||
'label_sms_from' => psm_get_lang('config', 'sms_from'),
|
'label_sms_from' => psm_get_lang('config', 'sms_from'),
|
||||||
|
|
|
@ -0,0 +1,58 @@
|
||||||
|
<?php
|
||||||
|
/**
|
||||||
|
* PHP Server Monitor
|
||||||
|
* Monitor your servers and websites.
|
||||||
|
*
|
||||||
|
* This file is part of PHP Server Monitor.
|
||||||
|
* PHP Server Monitor is free software: you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation, either version 3 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* PHP Server Monitor is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with PHP Server Monitor. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*
|
||||||
|
* @package phpservermon
|
||||||
|
* @author Andreas Ek
|
||||||
|
* @copyright Copyright (c) 2008-2014 Pepijn Over <pep@neanderthal-technology.com>
|
||||||
|
* @license http://www.gnu.org/licenses/gpl.txt GNU GPL v3
|
||||||
|
* @version Release: @package_version@
|
||||||
|
* @link http://www.phpservermonitor.org/
|
||||||
|
* @since phpservermon 3.1.1
|
||||||
|
**/
|
||||||
|
|
||||||
|
namespace psm\Txtmsg;
|
||||||
|
|
||||||
|
class Nexmo extends Core {
|
||||||
|
// =========================================================================
|
||||||
|
// [ Fields ]
|
||||||
|
// =========================================================================
|
||||||
|
public $gateway = 1;
|
||||||
|
public $resultcode = null;
|
||||||
|
public $resultmessage = null;
|
||||||
|
public $success = false;
|
||||||
|
public $successcount = 0;
|
||||||
|
|
||||||
|
public function sendSMS($message) {
|
||||||
|
$nexmo_url = "https://rest.nexmo.com/sms/json";
|
||||||
|
$nexmo_data = rawurlencode( $message );
|
||||||
|
|
||||||
|
foreach( $this->recipients as $phone ){
|
||||||
|
$result = file_get_contents( $nexmo_url .
|
||||||
|
"?api_key=" . $this->username .
|
||||||
|
"&api_secret=" . $this->password .
|
||||||
|
"&from=" . $this->originator .
|
||||||
|
"&to=" . $phone .
|
||||||
|
"&type=text" .
|
||||||
|
"&text=" . $nexmo_data
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
return $result;
|
||||||
|
}
|
||||||
|
}
|
Loading…
Reference in New Issue