SMS
[ class tree: SMS ] [ index: SMS ] [ all elements ]

Class: SMS_Clickatell

Source Location: /Clickatell.php

Class Overview


PHP Interface into Clickatell API


Author(s):

Version:

  • $Id: Clickatell.php,v 1.23 2005/01/29 10:34:26 jacques Exp $

Copyright:

  • 2002-2005 Jacques Marneweck

Methods



Class Details

[line 31]
PHP Interface into Clickatell API



Tags:

access:  public
version:  $Id: Clickatell.php,v 1.23 2005/01/29 10:34:26 jacques Exp $
copyright:  2002-2005 Jacques Marneweck
author:  Jacques Marneweck <jacques@php.net>


[ Top ]


Class Methods


method auth [line 141]

mixed auth( )

Authenticate to the Clickatell API Server.



Tags:

return:  true on sucess or PEAR_Error object
since:  1.1
access:  public


[ Top ]

method deletemsg [line 195]

void deletemsg( mixed $apimsgid)

Delete message queued by Clickatell which has not been passed onto the SMSC.



Tags:

see:  http://www.clickatell.com/downloads/Clickatell_http_2.2.2.pdf
since:  1.14
access:  public


[ Top ]

method getbalance [line 246]

void getbalance( )

Query balance of remaining SMS credits



Tags:

since:  1.9
access:  public


[ Top ]

method getmsgcharge [line 295]

void getmsgcharge( string $apimsgid)

Determine the cost of the message which was sent



Tags:

since:  1.20


Parameters:

string   $apimsgid   api_msg_id

[ Top ]

method init [line 369]

void init( [mixed $_params = array()])

Initilaise the Clicaktell SMS Class

  1. <?php
  2. require_once 'SMS/Clickatell.php';
  3.  
  4. $sms = new SMS_Clickatell;
  5. $res = $sms->init (
  6. array (
  7. 'user' => 'username',
  8. 'pass' => 'password',
  9. 'api_id' => '12345'
  10. )
  11. );
  12. if (PEAR::isError($res)) {
  13. die ($res->getMessage());
  14. }
  15. $res = $sms->auth();
  16. if (PEAR::isError($res)) {
  17. die ($res->getMessage());
  18. }
  19. ?>




Tags:

since:  1.9
access:  public


[ Top ]

method ping [line 398]

mixed ping( )

Keep our session to the Clickatell API Server valid.



Tags:

return:  true on sucess or PEAR_Error object
since:  1.1
access:  public


[ Top ]

method querymsg [line 451]

string querymsg( string $apimsgid)

Query message status



Tags:

return:  message status or PEAR_Error object
since:  1.5
access:  public


Parameters:

string   $apimsgid   spimsgid generated by Clickatell API

[ Top ]

method sendmsg [line 503]

mixed sendmsg( array $_msg)

Send an SMS Message via the Clickatell API Server



Tags:

return:  true on sucess or PEAR_Error object
since:  1.2
access:  public


Parameters:

array   $_msg   database result set

[ Top ]

method tokenpay [line 616]

void tokenpay( string $voucher)

Spend a clickatell voucher which can be used for topping up of sub user accounts.



Tags:

see:  http://www.clickatell.com/downloads/Clickatell_http_2.2.4.pdf
since:  1.22
access:  public


Parameters:

string   $voucher   voucher number

[ Top ]


Documentation generated on Tue, 24 May 2005 21:18:02 +0200 by phpDocumentor 1.3.0RC3