PHP SMS API Script

Visit the PHP SMS API Project at: http://code.google.com/p/textmagic-sms-api-php/

Direct download link
This PHP wrapper provides a way to integrate TextMagic SMS Gateway to your PHP application.

This is how you can get started with PHP:

1. Create a TextMagic account on http://www.textmagic.com/.

2. Generate API password here.

3. Get source code of the wrapper either by using SVN:

  • svn checkout http://textmagic-sms-api-php.googlecode.com/svn/trunk/ textmagic-sms-api-php-read-only
  • Or by direct zip archive download from this page or from Google code project.

4. Include TextMagicAPI.php file to your application

5. Start use it

PHP Code Example
$api = new TextMagicAPI(array(
    "username"
=> "yourTextMeUsername",
    "password"
=> "yourTextMePassword"
));

$text = "Your message here";

// Use this number for testing purposes. This is absolutely free.
$phones = array(9991234567);

$results = $api->send($text, $phones, true);

?>

There is also a CodeIgniter library for TextMagic API.