PHP code example of itbmedia / sms24-api-php

1. Go to this page and download the library: Download itbmedia/sms24-api-php library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

itbmedia / sms24-api-php example snippets


 
	nt = 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);