New SMS gateway - Denmark

jesperlowe

New Member
I?m trying to add a danish sms gateway to my smsgateways.

I have made a copy of the kapow.php and named it cpsms.php

<?php
/**
* Send an SMS via the CPSMS sms gateway
*
* @package Joomla.Plugin
* @subpackage Fabrik.form.sms
* @copyright Copyright (C) 2005-2015 fabrikar.com - All rights reserved.
* @license GNU/GPL http://www.gnu.org/copyleft/gpl.html
* Copy From kapow.php
*/

// No direct access
defined('_JEXEC') or die('Restricted access');

require_once COM_FABRIK_FRONTEND . '/helpers/sms.php';

/**
* CPSMS SMS gateway class
*
* @package Joomla.Plugin
* @subpackage Fabrik.form.sms
* @since 3.0
*/

class CPSMS extends JObject
{
/**
* URL To Post SMS to
*
* @var string
*/
protected $url = 'https://www.cpsms.dk/sms/?username=%s&password=%s&recipient=%s&message=%s&from=%s';

/**
* Send SMS
*
* @param string $message sms message
* @param array $opts Options
*
* @return void
*/

public function process($message, $opts)
{
$username = FArrayHelper::getValue($opts, 'sms-username');
$password = FArrayHelper::getValue($opts, 'sms-password');
$smsfrom = FArrayHelper::getValue($opts, 'sms-from');
$smsto = FArrayHelper::getValue($opts, 'sms-to');
$smstos = explode(',', $smsto);

foreach ($smstos as $smsto)
{
$url = sprintf($this->url, $username, $password, $smsto, $message);
FabrikSMS::doRequest('GET', $url, '');
}
}
}


But my PHP skills "sucks" at this and i can?t get it working..

i tested the url with actual data and it works but getting the variables in NOTHING works...

Any Ideas to what i?m doing wrong?
 
We are in need of some funding.
More details.

Thank you.

Members online

Back
Top