|
Project Information
Featured
Links
|
IntroductionThis is a class to give you an easy solution to send SMS and receive replies with this simple API wrapper class. The wrapper provides a way to integrate TextMagic SMS Gateway to your PHP application. Quick Start Guide- Create TextMagic account on http://www.textmagic.com/
- Get wrapper's source code by executing the command svn checkout http://textmagic-sms-api-php.googlecode.cour om/svn/trunk/ textmagic-sms-api-php-read-only
- Include TextMagicAPI.php file to your application
- Set your account's settings
- Use it!
Features/supported API functions- send - send SMS, scheduled sending
- account - check account's balance
- message_status - check message's cost and delivery status
- receive - receive incoming messages
- delete_reply - delete specified incoming messages
- check_number - check phone number validity and destination price
Example
$api = new TextMagicAPI(array(
"username" => "your_user_name",
"password" => "your_API_password",
));
$text = "Hello world!";
$phones = array(9991234567);
$is_unicode = true;
$api->send($text, $phones, $is_unicode);
This is simplified version. For production code using, read real examples first. Notes- Exceptions thrown by the server are turned into Exceptions in the library through the response parsers. all functions have explicit exceptions.
- There is phpdoc's commenting throughout the code.
Requirements- PHP 5.0.0+ (tested on 5.2.6 Ubuntu 9.04)
- JSON extension(tested on 1.2.1)
Changelog- June 5, 2009 - first API wrapper version has been released.
- June 27, 2009 - fopen request method has been added.
- November 11, 2010 - fopen is default sending method (curl is no longer supported).
Here’s what you’ll get: A 10% share of the lifetime value of the customer. If a customer spends £5,000 on SMS credit during his or her membership of TextMagic, you’ll earn £500. Bonus: we’ll pay you a £15 flat fee for each new paying customer referral. You’ll still get your 10% revenue share from their initial order, too.
|