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

Class: SMSExpertSender

Source Location: /smsexpertsender.php

Class Overview


Sends SMS via the SMS-Gateway of SMS-Expert


Author(s):

  • SMS-Expert
  • Bastian Treger

Version:

  • 1.0

Copyright:

  • SMS-Expert 2009

Variables

Methods



Class Details

[line 25]
Sends SMS via the SMS-Gateway of SMS-Expert

Copyright 2009 SMS-Expert

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.




Tags:

author:  SMS-Expert
author:  Bastian Treger
version:  1.0
copyright:  SMS-Expert 2009
link:  http://www.sms-expert.de


[ Top ]


Class Variables

static $debug =  true

[line 41]



Tags:

var:  enables or disables debugging output
access:  private

Type:   boolean


[ Top ]

static $gateway_host =  'gateway.sms-expert.de'

[line 44]



Tags:

access:  private

Type:   mixed


[ Top ]

static $gateway_password =  'TopSecret123'

[line 33]



Tags:

var:  Enter Your Gateway-Password here
access:  private

Type:   string


[ Top ]

static $gateway_port =  443

[line 45]



Tags:

access:  private

Type:   mixed


[ Top ]

static $gateway_protocol =  'https://'

[line 43]



Tags:

access:  private

Type:   mixed


[ Top ]

static $gateway_urlpath =  '/send/'

[line 46]



Tags:

access:  private

Type:   mixed


[ Top ]

static $sendmode =  'curl'

[line 37]



Tags:

var:  Possible values for sendmode: curl, socket, file
access:  private

Type:   string


[ Top ]

static $typelist = array('standard','expert')

[line 49]



Tags:

access:  private

Type:   mixed


[ Top ]

static $user =  'YourUsername'

[line 29]



Tags:

var:  Enter Your Username here
access:  private

Type:   string


[ Top ]

static $version =  1.0

[line 47]



Tags:

access:  private

Type:   mixed


[ Top ]

$message =  null

[line 53]



Tags:

access:  private

Type:   mixed


[ Top ]

$receiver =  null

[line 51]



Tags:

access:  private

Type:   mixed


[ Top ]

$responseCost =  null

[line 58]



Tags:

access:  private

Type:   mixed


[ Top ]

$responseMessageID =  null

[line 57]



Tags:

access:  private

Type:   mixed


[ Top ]

$responseStatusCode =  null

[line 55]



Tags:

access:  private

Type:   mixed


[ Top ]

$responseStatusText =  null

[line 56]



Tags:

access:  private

Type:   mixed


[ Top ]

$sender =  null

[line 52]



Tags:

access:  private

Type:   mixed


[ Top ]

$timestamp =  null

[line 54]



Tags:

access:  private

Type:   mixed


[ Top ]

$type =  null

[line 50]



Tags:

access:  private

Type:   mixed


[ Top ]



Class Methods


method getContentOfHTTPResponse [line 297]

string getContentOfHTTPResponse( $response)

Extracts the content of the HTTP-Response. Needed only for the sendmode "socket".



Tags:

return:  Content of the HTTP-Response.
access:  private


Parameters:

Array   $response  

[ Top ]

method getHash [line 353]

string getHash( )

Returns the MD5 hash for the SMS

Hash Source: User|GatewayPassword|Type|Sender|Receiver|Message|Timestamp




Tags:

return:  MD5-Hash
access:  private


[ Top ]

method getMessage [line 149]

string getMessage( )

Returns the message text.



Tags:

return:  The message text
access:  public


[ Top ]

method getReceiver [line 97]

integer getReceiver( )

Returns the phone number of the receiver



Tags:

return:  Phone number of the receiver
access:  public


[ Top ]

method getRequestData [line 330]

string getRequestData( )

Returns urlencoded name-value pairs for the HTTP-Request



Tags:

return:  Urlencoded name-value pairs
access:  private


[ Top ]

method getResponseCost [line 417]

double getResponseCost( )

Returns the cost of the response



Tags:

return:  Cost in EUR
access:  public


[ Top ]

method getResponseMessageID [line 409]

string getResponseMessageID( )

Returns the message id of the response



Tags:

return:  Message-ID
access:  public


[ Top ]

method getResponseStatusCode [line 393]

integer getResponseStatusCode( )

Returns the status code of the response



Tags:

return:  Status code
access:  public


[ Top ]

method getResponseStatusText [line 401]

string getResponseStatusText( )

Returns the status text of the response



Tags:

return:  Status text
access:  public


[ Top ]

method getSendDateTime [line 186]

string getSendDateTime( [ $format = "YYYY-mm-dd HH:ii"])

Returns the date and time for a timeshifted SMS



Tags:

return:  Date and Time
see:  http://php.net/manual/de/function.date.php
access:  public


Parameters:

   $format  

[ Top ]

method getSender [line 128]

string getSender( )

Returns the sender of the SMS



Tags:

return:  Sender of the SMS
access:  public


[ Top ]

method getSMSType [line 76]

string getSMSType( )

Gets the type of the sms



Tags:

return:  Type of the SMS
access:  public


[ Top ]

method readResponse [line 372]

void readResponse( string $response)

Reads the XML-Response of the SMS-Gateway



Tags:



Parameters:

string   $response   The XML-Response of the gateway.

[ Top ]

method send [line 195]

void send( )

Checks and sends the SMS



Tags:

throws:  SMSExpertSenderException
access:  public


[ Top ]

method sendModeCurl [line 223]

void sendModeCurl( )

Sends the SMS via Curl (POST)



Tags:

link:  http://de.php.net/manual/de/book.curl.php
access:  private


[ Top ]

method sendModeFile [line 315]

void sendModeFile( )

Sends the SMS via file (GET)



Tags:



[ Top ]

method sendModeSocket [line 251]

void sendModeSocket( )

Sends the SMS via Socket (POST)



Tags:



[ Top ]

method setMessage [line 137]

void setMessage( string $message)

Sets the message text.



Tags:

throws:  SMSExpertSenderException
access:  public


Parameters:

string   $message   The message text. Up to 1530 characters possible.

[ Top ]

method setReceiver [line 85]

void setReceiver( integer $receiver)

Sets the phone number of the receiver



Tags:

throws:  SMSExpertSenderException
access:  public


Parameters:

integer   $receiver   Number in international format WITHOUT leading + or 00

[ Top ]

method setSendDateTime [line 162]

void setSendDateTime( integer $year, integer $month, integer $day, integer $hour, integer $minute)

Sets the date and the time for a timeshifted SMS. DON'T call these function if you want send the SMS immediately.



Tags:

throws:  SMSExpertSenderException
access:  public


Parameters:

integer   $year   Year (4 digits, YYYY)
integer   $month   Month (2 digits, mm)
integer   $day   Day (2 digits, dd)
integer   $hour   Hour (2 digits, HH)
integer   $minute   Minute (2 digits, ii)

[ Top ]

method setSender [line 106]

void setSender( string $sender)

Sets the sender phone number or a text



Tags:

throws:  SMSExpertSenderException
access:  public


Parameters:

string   $sender   Sender phone number in international format WITHOUT leading + or 00. From 6 to 16 digits possible. For a text as sender up to 11 characters possible.

[ Top ]

method setSMSType [line 64]

void setSMSType( string $type)

Sets the type of the SMS



Tags:

access:  public


Parameters:

string   $type   Type of the SMS. Possible values "standard" or "expert"

[ Top ]


Documentation generated on Thu, 17 Dec 2009 14:55:21 +0100 by phpDocumentor 1.4.3