itbmedia / sms24-api-php
Send sms through SMS24 Api
Installs: 1 581
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 1
Forks: 0
Open Issues: 0
Requires
- php: >=5.5
- ext-curl: *
- ext-json: *
This package is auto-updated.
Last update: 2024-11-10 11:05:53 UTC
README
In your admin screen of http://www.sms24.se/ you can generate an API Key for your account to send SMS
Installation through composer
This package can be installed through composer
See https://getcomposer.org/ for more information and documentation.
Install it by running composer require itbmedia/sms24-api-php
Usage through regular PHP
<?php
require_once("path/to/dir/vendor/autoload.php");
$client = new \Sms24\Api\Client('YOUR_API_KEY');
$sms = new \Sms24\Api\Models\Sms('Hello world!');
$sms->addContact(new \Sms24\Api\Models\Contact('0731525291', 'SE'));
$sms->setOriginator(new \Sms24\Api\Models\Originator('Anonymous', 'alpha'));
$sms = $client->sendSms($sms);