Class HttpClient
Driver for HTTP based services.
- tschiemer\Aspsms\AbstractClient
-
tschiemer\Aspsms\Http\HttpClient
Namespace: tschiemer\Aspsms\Http
Package: aspsms
Copyright: 2013 Philip Tschiemer, <tschiemer@filou.se>
License: v3 http://www.gnu.org/licenses/lgpl-3.0.txt
Version: 1.1.0
Link: https://github.com/tschiemer/aspsms-php
Located at lib/tschiemer/Aspsms/Http/HttpClient.php
Package: aspsms
Copyright: 2013 Philip Tschiemer, <tschiemer@filou.se>
License: v3 http://www.gnu.org/licenses/lgpl-3.0.txt
Version: 1.1.0
Link: https://github.com/tschiemer/aspsms-php
Located at lib/tschiemer/Aspsms/Http/HttpClient.php
public
|
#
__construct( array $options = array() )
Instantiate and configure HttpClient. Possible options (to be passed in assoc array): |
public
array
|
|
public
|
|
public
|
|
public
|
|
public
|
|
public
|
|
public
|
canProcess(),
clear(),
getResponse()
|
public
string
|
$baseUrl | 'https://webservice.aspsms.com/aspsmsx2.asmx/' |
#
Request base url |
public
string
|
$method | 'POST' |
#
HTTP method to use |
public
array
|
$curlOpt | array(
CURLOPT_USERAGENT => 'aspsms-php v1 http:1',
CURLOPT_SSL_VERIFYPEER => FALSE
) |
#
List of CURL options to use. |
public
array[]
|
$requests | array(
'getVersion' => array(
'service' => 'VersionInfo'
),
'getCredits' => array(
'service' => 'CheckCredits',
'param' => array(
'UserKey' => '',
'Password' => ''
)),
'getStatusCodeDescription' => array(
'service' => 'GetStatusCodeDescription',
'param' => array(
'StatusCode' => ''
)),
'sendText' => array(
'service' => 'SendUnicodeSMS',
'param' => array(
'UserKey' => '',
'Password' => '',
'Recipients'=> '',
'Originator'=> '',
'MessageText' => '',
'DeferredDeliveryTime' => '',
'FlashingSMS'=> '',
'TimeZone' => '',
'URLBufferedMessageNotification' => '',
'URLDeliveryNotification' => '',
'URLNonDeliveryNotification' => '',
'AffiliateId' => ''
)),
'sendWapPush' => array(
'service' => 'SimpleWAPPush',
'param' => array(
'UserKey' => '',
'Password' => '',
'Recipients'=> '',
'Originator'=> '',
'WapDescription' => '',
'WapURL' => '',
'DeferredDeliveryTime' => '',
'FlashingSMS'=> '',
'TimeZone' => '',
'URLBufferedMessageNotification' => '',
'URLDeliveryNotification' => '',
'URLNonDeliveryNotification' => '',
'AffiliateId' => ''
)),
'sendToken' => array(
'service' => 'SendTokenSMS',
'param' => array(
'UserKey' => '',
'Password' => '',
'Recipients'=> '',
'Originator'=> '',
'MessageData'=>'',
'TokenReference'=>'',
'TokenValidity'=>'5',
'TokenMask' => '',
'VerificationCode' => '',
'TokenCaseSensitive' => '0',
'URLBufferedMessageNotification' => '',
'URLDeliveryNotification' => '',
'URLNonDeliveryNotification' => '',
'AffiliateId' => ''
)),
'verifyToken' => array(
'service' => 'VerifyToken',
'param' => array(
'UserKey' => '',
'Password' => '',
'PhoneNumber'=> '',
'TokenReference'=>'',
'VerificationCode' => '',
)),
'getDeliveryStatus' => array(
'service' => 'InquireDeliveryNotifications',
'param' => array(
'UserKey' => '',
'Password' => '',
'TransactionReferenceNumbers'=> ''
)),
'checkOriginator' => array(
'service' => 'CheckOriginatorAuthorization',
'param' => array(
'UserKey' => '',
'Password' => '',
'Originator'=> ''
)),
'sendOriginatorCode' => array(
'service' => 'SendOriginatorUnlockCode',
'param' => array(
'UserKey' => '',
'Password' => '',
'Originator'=> ''
)),
'unlockOriginator' => array(
'service' => 'UnlockOriginator',
'param' => array(
'UserKey' => '',
'Password' => '',
'Originator'=> '',
'OriginatorUnlockCode'=>'',
'AffiliateId'=> ''
))
) |
#
Request configuration |
$request,
$response
|