hostlink/epost-php

A library for e-post

2.0.2 2023-03-17 07:45 UTC

This package is auto-updated.

Last update: 2024-12-17 11:42:00 UTC


README

Usage

SMS

use EPost\SMS;

$sms = new SMS();
//$sms->setCountryCode("852");  you can set country code. if not set, default 852
$sms->setPhone("27717387"); //no need add 852
$sms->setContent("Hello");

$key="..."; //get from hostlink
$epost = new EPost($key);
print_r($epost->sendSMS($sms));


### get SMS report
```php
$sms = new SMS();
$from="2021-05-10";
$to="2021-05-15";
$report = $epost->getSMSReport($from,$to);

get quota and expiry date

$epost = new EPost($key);
echo $epost->getSMSQuota();
echo $epost->getSMSExpiryDate();