1. Go to this page and download the library: Download ez-php/sms 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/ */
use EzPhp\Sms\Sms;
use EzPhp\Sms\SmsMessage;
Sms::send('+4366412345678', 'Your code is 123456'); // default sender
Sms::send('+4366412345678', new SmsMessage('Order shipped', 'MyShop')); // sender override
public function __construct(private readonly SmsSenderInterface $sms) {}
$this->sms->send($phone, new SmsMessage('Hello'));
$driver = new \EzPhp\Sms\Driver\ArrayDriver();
Sms::setSender($driver);
// ... code under test ...
$this->assertCount(1, $driver->sentTo('+4366412345678'));
Sms::resetSender();
bash
composer
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.