Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/alexzvn/speedsms-api
This package replace shitty code that speedsms.vn provided.
https://github.com/alexzvn/speedsms-api
sms-api speedsms
Last synced: 20 days ago
JSON representation
This package replace shitty code that speedsms.vn provided.
- Host: GitHub
- URL: https://github.com/alexzvn/speedsms-api
- Owner: alexzvn
- Created: 2021-03-05T05:18:01.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2021-03-16T15:24:09.000Z (over 3 years ago)
- Last Synced: 2024-10-06T01:06:32.767Z (about 1 month ago)
- Topics: sms-api, speedsms
- Language: PHP
- Homepage:
- Size: 5.86 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: readme.md
Awesome Lists containing this project
README
# General Speedsms API
## Installation
Install via composer
```bash
composer require alexzvn/speedsms-api
```## Use Speedsms API
First require autoload into your php script.
```php
getUserInfo();// get email
$user->email();// get balance (int)
$user->balance();
```### Send an sms to phone number
```php
$phone = '0355012345';
// maximum is 160 length for ascii and 70 if contains unicode
// other wise you'll hit Alexzvn\Speedsms\MessageLengthException
$message = 'your message';$type = Speedsms::SMS_SUPPORT;
// depend on type you choice
// for sms support no needed
$sender = '';$response = $sms->sendSms($phone, $message, $type, $sender);
```### Handle incoming callback sms
```php
$sms = Speedsms::incoming()// get phone
$sms->phone// get message
$sms->message// and get type
$sms->type
```## Contributing
Feel free to create pull request or issue for this package.
## License
The package is available as open source under the terms of the [MIT License](http://opensource.org/licenses/MIT).