PHP, Programming

Send SMS messages from your Website using PHP

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

3 thoughts on “Send SMS messages from your Website using PHP

  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.

  2. Pingback: Miami Web Servers

Leave a Reply

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

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 )

Google+ photo

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

Connecting to %s