diff --git a/CHANGELOG.rst b/CHANGELOG.rst index 0c25d0d2..f36b1495 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -7,6 +7,7 @@ not yet released * #161: Added Swedish translation. * #169: Increased server ip char limit to 500. +* #164: Added support for FreeVoipDeal SMS gateway v3.1.1 (released November 6, 2014) diff --git a/README.rst b/README.rst index 0874f5db..e7aa9d2a 100755 --- a/README.rst +++ b/README.rst @@ -46,6 +46,7 @@ The following SMS gateways are currently available: * SMSit - * Spryng - * Textmarketer - +* FreeVoipDeal - Please note: for these gateways you will need an account with sufficient credits. diff --git a/docs/credits.rst b/docs/credits.rst index 3bfa0950..4b8186dc 100644 --- a/docs/credits.rst +++ b/docs/credits.rst @@ -9,6 +9,10 @@ Credits The following people have contributed to the development of PHP Server Monitor: +* Michiel van der Wulp - https://github.com/mvdw + + * FreeVoipDeal SMS gateway + * Pepijn Over - https://github.com/dopeh * Creator and project maintainer diff --git a/docs/intro.rst b/docs/intro.rst index daaea398..92c6d43a 100644 --- a/docs/intro.rst +++ b/docs/intro.rst @@ -55,6 +55,7 @@ The following SMS gateways are currently available: * SMSit - * Spryng - * Textmarketer - +* FreeVoipDeal - Please note: for these gateways you will need an account with sufficient credits. diff --git a/src/includes/functions.inc.php b/src/includes/functions.inc.php index 8a81dc2c..0cd19273 100644 --- a/src/includes/functions.inc.php +++ b/src/includes/functions.inc.php @@ -466,6 +466,9 @@ function psm_build_sms() { case 'smsglobal': $sms = new \psm\Txtmsg\Smsglobal(); break; + case 'freevoipdeal': + $sms = new \psm\Txtmsg\FreeVoipDeal(); + break; } // copy login information from the config file diff --git a/src/lang/bg_BG.lang.php b/src/lang/bg_BG.lang.php index 17ad0edd..bebc0d40 100644 --- a/src/lang/bg_BG.lang.php +++ b/src/lang/bg_BG.lang.php @@ -194,6 +194,7 @@ $sm_lang = array( 'sms_gateway_inetworx' => 'Inetworx', 'sms_gateway_clickatell' => 'Clickatell', 'sms_gateway_textmarketer' => 'Textmarketer', + 'sms_gateway_freevoipdeal' => 'FreeVoipDeal', 'sms_gateway_smsglobal' => 'SMSGlobal', 'sms_gateway_username' => 'Потребител', 'sms_gateway_password' => 'Парола', diff --git a/src/lang/cs_CZ.lang.php b/src/lang/cs_CZ.lang.php index ec32ea92..1404ba6f 100644 --- a/src/lang/cs_CZ.lang.php +++ b/src/lang/cs_CZ.lang.php @@ -195,6 +195,7 @@ $sm_lang = array( 'sms_gateway_textmarketer' => 'Textmarketer', 'sms_gateway_smsglobal' => 'SMSGlobal', 'sms_gateway_smsit' => 'Smsit', + 'sms_gateway_freevoipdeal' => 'FreeVoipDeal', 'sms_gateway_username' => 'Uživatelské jméno brány', 'sms_gateway_password' => 'Heslo brány', 'sms_from' => 'Telefonní číslo odesilatele', diff --git a/src/lang/da_DK.lang.php b/src/lang/da_DK.lang.php index aa5e5b03..04884e11 100644 --- a/src/lang/da_DK.lang.php +++ b/src/lang/da_DK.lang.php @@ -195,6 +195,7 @@ $sm_lang = array( 'sms_gateway_textmarketer' => 'Textmarketer', 'sms_gateway_smsglobal' => 'SMSGlobal', 'sms_gateway_smsit' => 'Smsit', + 'sms_gateway_freevoipdeal' => 'FreeVoipDeal', 'sms_gateway_username' => 'Gateway brugernavn/apikey', 'sms_gateway_password' => 'Gateway adgangskode', 'sms_from' => 'Afsenders navn.', diff --git a/src/lang/de_DE.lang.php b/src/lang/de_DE.lang.php index ad1cb964..d448d558 100644 --- a/src/lang/de_DE.lang.php +++ b/src/lang/de_DE.lang.php @@ -195,6 +195,7 @@ $sm_lang = array( 'sms_gateway_textmarketer' => 'Textmarketer', 'sms_gateway_smsglobal' => 'SMSGlobal', 'sms_gateway_smsit' => 'Smsit', + 'sms_gateway_freevoipdeal' => 'FreeVoipDeal', 'sms_gateway_username' => 'Gateway Benutzername', 'sms_gateway_password' => 'Gateway Passwort', 'sms_from' => 'SMS-Sendernummer', diff --git a/src/lang/en_US.lang.php b/src/lang/en_US.lang.php index 295f6e23..beb90d89 100644 --- a/src/lang/en_US.lang.php +++ b/src/lang/en_US.lang.php @@ -195,6 +195,7 @@ $sm_lang = array( 'sms_gateway_textmarketer' => 'Textmarketer', 'sms_gateway_smsglobal' => 'SMSGlobal', 'sms_gateway_smsit' => 'Smsit', + 'sms_gateway_freevoipdeal' => 'FreeVoipDeal', 'sms_gateway_username' => 'Gateway username', 'sms_gateway_password' => 'Gateway password', 'sms_from' => 'Sender\'s phone number', diff --git a/src/lang/es_ES.lang.php b/src/lang/es_ES.lang.php index cd2bd0ce..34d4d076 100644 --- a/src/lang/es_ES.lang.php +++ b/src/lang/es_ES.lang.php @@ -196,6 +196,7 @@ $sm_lang = array( 'sms_gateway_textmarketer' => 'Textmarketer', 'sms_gateway_smsglobal' => 'SMSGlobal', 'sms_gateway_smsit' => 'Smsit', + 'sms_gateway_freevoipdeal' => 'FreeVoipDeal', 'sms_gateway_username' => 'Gateway username', 'sms_gateway_password' => 'Gateway password', 'sms_from' => 'Número origen del SMS', diff --git a/src/lang/fr_FR.lang.php b/src/lang/fr_FR.lang.php index dcc10449..0b012270 100644 --- a/src/lang/fr_FR.lang.php +++ b/src/lang/fr_FR.lang.php @@ -196,6 +196,7 @@ $sm_lang = array( 'sms_gateway_textmarketer' => 'Textmarketer', 'sms_gateway_smsglobal' => 'SMSGlobal', 'sms_gateway_smsit' => 'Smsit', + 'sms_gateway_freevoipdeal' => 'FreeVoipDeal', 'sms_gateway_username' => 'Nom utilisateur de la passerelle', 'sms_gateway_password' => 'Mot de passe de la passerelle', 'sms_from' => 'SMS de l\'expéditeur', diff --git a/src/lang/it_IT.lang.php b/src/lang/it_IT.lang.php index f6160955..e99df805 100644 --- a/src/lang/it_IT.lang.php +++ b/src/lang/it_IT.lang.php @@ -195,6 +195,7 @@ $sm_lang = array( 'sms_gateway_textmarketer' => 'Textmarketer', 'sms_gateway_smsglobal' => 'SMSGlobal', 'sms_gateway_smsit' => 'Smsit', + 'sms_gateway_freevoipdeal' => 'FreeVoipDeal', 'sms_gateway_username' => 'Nome Utente Gateway', 'sms_gateway_password' => 'Password Gateway', 'sms_from' => 'Numero di telefono del mittente', diff --git a/src/lang/ko_KR.lang.php b/src/lang/ko_KR.lang.php index 99f4ad3b..94f4a45c 100644 --- a/src/lang/ko_KR.lang.php +++ b/src/lang/ko_KR.lang.php @@ -195,6 +195,7 @@ $sm_lang = array( 'sms_gateway_smsit' => 'Smsit', 'sms_gateway_textmarketer' => 'Textmarketer', 'sms_gateway_smsglobal' => 'SMSGlobal', + 'sms_gateway_freevoipdeal' => 'FreeVoipDeal', 'sms_gateway_username' => 'Gateway username', 'sms_gateway_password' => 'Gateway password', 'sms_from' => 'Sender\'s phone number', diff --git a/src/lang/nl_NL.lang.php b/src/lang/nl_NL.lang.php index 41b181fd..3ebd71d7 100644 --- a/src/lang/nl_NL.lang.php +++ b/src/lang/nl_NL.lang.php @@ -195,6 +195,7 @@ $sm_lang = array( 'sms_gateway_textmarketer' => 'Textmarketer', 'sms_gateway_smsglobal' => 'SMSGlobal', 'sms_gateway_smsit' => 'Smsit', + 'sms_gateway_freevoipdeal' => 'FreeVoipDeal', 'sms_gateway_username' => 'Gateway gebruikersnaam', 'sms_gateway_password' => 'Gateway wachtwoord', 'sms_from' => 'Telefoonnummer afzender', diff --git a/src/lang/pl_PL.lang.php b/src/lang/pl_PL.lang.php index 4a871048..2427fe7d 100644 --- a/src/lang/pl_PL.lang.php +++ b/src/lang/pl_PL.lang.php @@ -195,6 +195,7 @@ $sm_lang = array( 'sms_gateway_textmarketer' => 'Textmarketer', 'sms_gateway_smsglobal' => 'SMSGlobal', 'sms_gateway_smsit' => 'Smsit', + 'sms_gateway_freevoipdeal' => 'FreeVoipDeal', 'sms_gateway_username' => 'Login do bramki', 'sms_gateway_password' => 'Hasło do bramki', 'sms_from' => 'Numer nadawcy', diff --git a/src/lang/pt_BR.lang.php b/src/lang/pt_BR.lang.php index 8942ed06..a0ac37dc 100644 --- a/src/lang/pt_BR.lang.php +++ b/src/lang/pt_BR.lang.php @@ -195,6 +195,7 @@ $sm_lang = array( 'sms_gateway_textmarketer' => 'Textmarketer', 'sms_gateway_smsglobal' => 'SMSGlobal', 'sms_gateway_smsit' => 'Smsit', + 'sms_gateway_freevoipdeal' => 'FreeVoipDeal', 'sms_gateway_username' => 'Usuário do Gateway', 'sms_gateway_password' => 'Senha do Gateway', 'sms_from' => 'Número de telefone de envio', diff --git a/src/lang/ru_RU.lang.php b/src/lang/ru_RU.lang.php index 48ecc14b..2c081f60 100644 --- a/src/lang/ru_RU.lang.php +++ b/src/lang/ru_RU.lang.php @@ -195,6 +195,7 @@ $sm_lang = array( 'sms_gateway_textmarketer' => 'Textmarketer', 'sms_gateway_smsglobal' => 'SMSGlobal', 'sms_gateway_smsit' => 'Smsit', + 'sms_gateway_freevoipdeal' => 'FreeVoipDeal', 'sms_gateway_username' => 'Пользователь', 'sms_gateway_password' => 'Пароль', 'sms_from' => 'Номер отправителя', diff --git a/src/lang/sv_SE.lang.php b/src/lang/sv_SE.lang.php index 238b98cd..516d09b2 100644 --- a/src/lang/sv_SE.lang.php +++ b/src/lang/sv_SE.lang.php @@ -195,6 +195,7 @@ $sm_lang = array( 'sms_gateway_textmarketer' => 'Textmarketer', 'sms_gateway_smsglobal' => 'SMSGlobal', 'sms_gateway_smsit' => 'Smsit', + 'sms_gateway_freevoipdeal' => 'FreeVoipDeal', 'sms_gateway_username' => 'Gateway användarnamn', 'sms_gateway_password' => 'Gateway lösenord', 'sms_from' => 'Avsändarens telefonnummer', diff --git a/src/lang/tr_TR.lang.php b/src/lang/tr_TR.lang.php index caa5a6f0..1e01ca93 100644 --- a/src/lang/tr_TR.lang.php +++ b/src/lang/tr_TR.lang.php @@ -195,6 +195,7 @@ $sm_lang = array( 'sms_gateway_textmarketer' => 'Textmarketer', 'sms_gateway_smsglobal' => 'SMSGlobal', 'sms_gateway_smsit' => 'Smsit', + 'sms_gateway_freevoipdeal' => 'FreeVoipDeal', 'sms_gateway_username' => 'Servis kullanıcı adı', 'sms_gateway_password' => 'Servis şifresi', 'sms_from' => 'Gönderen numarası', diff --git a/src/lang/zh_CN.lang.php b/src/lang/zh_CN.lang.php index 05cbeee5..d937785c 100644 --- a/src/lang/zh_CN.lang.php +++ b/src/lang/zh_CN.lang.php @@ -195,6 +195,7 @@ $sm_lang = array( 'sms_gateway_textmarketer' => 'Textmarketer', 'sms_gateway_smsglobal' => 'SMSGlobal', 'sms_gateway_smsit' => 'Smsit', + 'sms_gateway_freevoipdeal' => 'FreeVoipDeal', 'sms_gateway_username' => 'SMS网关用户名', 'sms_gateway_password' => 'SMS网关密码', 'sms_from' => '发信人电话号', diff --git a/src/psm/Module/Config/Controller/ConfigController.class.php b/src/psm/Module/Config/Controller/ConfigController.class.php index c8216840..ca197931 100644 --- a/src/psm/Module/Config/Controller/ConfigController.class.php +++ b/src/psm/Module/Config/Controller/ConfigController.class.php @@ -313,6 +313,7 @@ class ConfigController extends AbstractController { 'label_sms_gateway_clickatell' => psm_get_lang('config', 'sms_gateway_clickatell'), '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_freevoipdeal' => psm_get_lang('config', 'sms_gateway_freevoipdeal'), 'label_sms_gateway_smsglobal' => psm_get_lang('config', 'sms_gateway_smsglobal'), 'label_sms_gateway_username' => psm_get_lang('config', 'sms_gateway_username'), 'label_sms_gateway_password' => psm_get_lang('config', 'sms_gateway_password'), diff --git a/src/psm/Txtmsg/FreeVoipDeal.class.php b/src/psm/Txtmsg/FreeVoipDeal.class.php new file mode 100755 index 00000000..d3a17f7b --- /dev/null +++ b/src/psm/Txtmsg/FreeVoipDeal.class.php @@ -0,0 +1,54 @@ +. + * + * @package phpservermon + * @author Michiel van der Wulp + * @copyright Copyright (c) 2014 Michiel van der Wulp + * @license http://www.gnu.org/licenses/gpl.txt GNU GPL v3 + * @version Release: v3.1.0 + * @link http://www.phpservermonitor.org/ + **/ + +namespace psm\Txtmsg; + +class FreeVoipDeal extends Core { + // ========================================================================= + // [ Fields ] + // ========================================================================= + public $gateway = 1; + public $resultcode = null; + public $resultmessage = null; + public $success = false; + public $successcount = 0; + + public function sendSMS($message) { + + $local_url = "https://www.freevoipdeal.com/myaccount/sendsms.php"; + $local_data = rawurlencode( $message ); + + foreach( $this->recipients as $phone ){ + + $result = file_get_contents( $local_url . "?username=" . $this->username + . "&password=" . $this->password . "&from=" . $this->originator . "&to=" . $phone + . "&text=" . $local_data ); + } + + return $result; + } +}