PHP code example of hostlink / epost-php
1. Go to this page and download the library: Download hostlink/epost-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/ */
hostlink / epost-php example snippets
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
$epost = new EPost($key);
echo $epost->getSMSQuota();
echo $epost->getSMSExpiryDate();