Skip to content

Commit

Permalink
Changes: implemented poc for ozeki-ng sendsms (Issue: #60)
Browse files Browse the repository at this point in the history
  • Loading branch information
back2arie committed Jul 29, 2012
1 parent 43e47de commit 004e9b4
Show file tree
Hide file tree
Showing 2 changed files with 57 additions and 1 deletion.
3 changes: 2 additions & 1 deletion application/config/kalkun_settings.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,8 @@
| gammu <http://wammu.eu>
| kannel <http://kannel.org> - Experimental
| clickatell <http://clickatell.com> - Experimental
|
| ozeking <http://ozekisms.com> - Experimental
|
*/
$config['gateway']['engine'] = 'gammu';
$config['gateway']['url'] = 'http://localhost:13013';
Expand Down
55 changes: 55 additions & 0 deletions application/models/gateway/ozeking_model.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
<?php
/**
* Kalkun
* An open source web based SMS Management
*
* @package Kalkun
* @author Kalkun Dev Team
* @license http://kalkun.sourceforge.net/license.php
* @link http://kalkun.sourceforge.net
*/

// ------------------------------------------------------------------------

/**
* Ozeking_model Class
*
* Handle all messages database activity
* for Ozeki NG <http://ozekisms.com>
*
* @package Kalkun
* @subpackage Messages
* @category Models
*/
require_once('gammu_model'.EXT);

class Ozeking_model extends Gammu_model {

/**
* Constructor
*
* @access public
*/
function __construct()
{
parent::__construct();
}

// --------------------------------------------------------------------

/**
* Send Messages (Still POC)
* Using HTTP API
*
* @return void
*/
function send_messages($data)
{
$gateway = $this->config->item('gateway');
file_get_contents($gateway['url'].'/api?action=sendmessage&username='.$gateway['username'].
'&password='.$gateway['password'].'&messagetype=SMS:TEXT&recipient='.$data['dest'].'&messagedata='.urlencode($data['message']));
}
}

/* End of file kannel_model.php */
/* Location: ./application/models/gateway/ozeking_model.php */

0 comments on commit 004e9b4

Please sign in to comment.