https://github.com/divineomega/sms-providers
Provides data on popular SMS providers
https://github.com/divineomega/sms-providers
php php-library sms sms-providers
Last synced: 10 months ago
JSON representation
Provides data on popular SMS providers
- Host: GitHub
- URL: https://github.com/divineomega/sms-providers
- Owner: DivineOmega
- License: lgpl-3.0
- Created: 2019-05-02T23:24:34.000Z (about 7 years ago)
- Default Branch: master
- Last Pushed: 2019-05-07T22:15:39.000Z (about 7 years ago)
- Last Synced: 2025-02-10T05:28:46.153Z (over 1 year ago)
- Topics: php, php-library, sms, sms-providers
- Language: PHP
- Size: 17.6 KB
- Stars: 3
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# SMS Providers
This library provides data on popular SMS providers.
## Installation
To install the SMS Providers package, simply run the
following Composer command from the root of your
project.
```bash
composer require divineomega/sms-providers
```
## Usage
### Get providers by destination country
You can retrieve all the providers that deliver SMS
to specific countries. See the following code for an
example.
```php
$country = (new Countries())->getByName('United Kingdom');
$providers = (new Providers())->getByDestinationCountry($country);
```
This code will retrieve an array of all the providers
that support sending text messages to phone numbers
starting with the '44' calling code (United Kingdom).
### Get providers by calling code
You can retrieve all the providers that deliver SMS
to numbers beginning with a specific calling code. See
the following example snippet.
```php
$providers = (new Providers())->getByDestinationCallingCode('44');
```
This code will retrieve an array of all the providers
that support sending text messages to phone numbers
starting with the '44' calling code (United Kingdom).