Interface to Clickatell API

todo Implement other methods than send_sms.
package org.openpsa.smslib

 Methods

__construct ()

get_balance ()

Non-numeric balance should be supposed infinite.

Also Clickatell has variable pricing and we cannot know the true cost of a message before it is sent so the balance checks are rather difficult

Returns

booleanfalse on error or whatever the GW returns

send_sms ($number, $msg, $sender, $dlr, $udh, $clientid)

Method sends any SMS deliverable data, handles encoding so when sending logos etc, provide msg and udh as binary.

Parameters

$number

$msg

$sender

$dlr

$udh

$clientid

_encode_req_feat ()

Encodes the features list to decimal value used by the server

_get_content_error ($content)

Look for error messages in content and decode them, returns false on no errors found, true on errors found.

Parameters

$content

_get_http_error ($headers)

Server HTTP level error decode

Parameters

$headers

_sanity_check ()

 Properties

 

mixed $api_id

 

mixed $features

 

mixed $uri