Federico Cargnelutti

Simple is better than complex. Complex is better than complicated. | @fedecarg

Send SMS messages from your Website using PHP

with 3 comments

Attila Szabó wrote a simple PHP class for sending SMS messages through the smsBug gateway. To send a single SMS message and receive the number of credits left, you only need to include two classes:

include('services/smsgateway/class.Transport.php');
include('services/smsgateway/class.SmsGateway.php');

// Send the message
try {
    $oSmsGateway = new SmsGateway();
    $oSmsGateway->SendSingleSms("421xxxxxx", "Hello");
    unset($oSmsGateway);
} catch(TransportException $e) {
    $error = 'SMS proxy error: '. $e->getMessage();
} catch(Excption $e) {
    $error = 'Unexpected error: '. $e->getMessage();
}

More info: Send SMS messages from your Website

Advertisement

Written by Federico

September 11, 2008 at 10:12 pm

Posted in PHP, Programming

3 Responses

Subscribe to comments with RSS.

  1. Romain Pouclet (aka Palleas) has written a class to use the French telecom Orange firm API services. Here is an
    example of his work (in french) .

    ++

    Hugo.

    Hugo

    September 11, 2008 at 10:36 pm

  2. [...] Send SMS messages from your Website using PHP: [...]

    Miami Web Servers

    September 12, 2008 at 12:57 am

  3. Thanks Hugo

    Federico

    September 12, 2008 at 8:27 am


Leave a Reply

Fill in your details below or click an icon to log in:

Gravatar
WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Connecting to %s

Follow

Get every new post delivered to your Inbox.

Join 43 other followers