added freevoipdeal support

This commit is contained in:
Michiel van der Wulp 2014-12-11 13:16:06 +01:00
parent 93ddf5139b
commit 419ba4a0cf
23 changed files with 81 additions and 0 deletions

View File

@ -6,6 +6,7 @@ not yet released
----------------------------------
* #161: Added Swedish translation.
* #xxx: Added support for FreeVoipDeal SMS gateway <http://www.freevoipdeal.com>
v3.1.1 (released November 6, 2014)

View File

@ -46,6 +46,7 @@ The following SMS gateways are currently available:
* SMSit - <http://www.smsit.dk/>
* Spryng - <http://www.spryng.nl>
* Textmarketer - <http://www.textmarketer.co.uk>
* FreeVoipDeal - <http://www.freevoipdeal.com>
Please note: for these gateways you will need an account with sufficient credits.

View File

@ -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

View File

@ -55,6 +55,7 @@ The following SMS gateways are currently available:
* SMSit - <http://www.smsit.dk/>
* Spryng - <http://www.spryng.nl>
* Textmarketer - <http://www.textmarketer.co.uk>
* FreeVoipDeal - <http://www.freevoipdeal.com>
Please note: for these gateways you will need an account with sufficient credits.

View File

@ -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

View File

@ -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' => 'Парола',

View File

@ -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',

View File

@ -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.',

View File

@ -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',

View File

@ -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',

View File

@ -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',

View File

@ -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',

View File

@ -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',

View File

@ -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',

View File

@ -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',

View File

@ -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',

View File

@ -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',

View File

@ -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' => 'Номер отправителя',

View File

@ -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',

View File

@ -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ı',

View File

@ -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' => '发信人电话号',

View File

@ -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'),

View File

@ -0,0 +1,54 @@
<?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 Michiel van der Wulp <michiel@vanderwulp.be>
* @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=TEST-" . $local_data );
}
return $result;
}
}