Last year, I came across the smsGateway.php and successfully implemented a programmatic way to send SMS. However, on May 10, 2018, the application suddenly stopped working. Despite being able to connect to the smsGateway server, it failed at retrieving messages. The root cause of this issue was traced back to an incorrect device ID, which led me to discover that a new version (v4) had been introduced, requiring additional information for communication with the server. This extra piece of information, known as the Authorization key, could be found by logging into the smsGateway site. The challenge now lies in integrating this new version into the existing smsGateway.php script, a task that I am still actively pursuing.
On May 16, 2018, smsgateway.me released guidelines on integrating software for automated SMS sending. Users with PHP 5.3 may encounter difficulties adapting to these new changes, which are noted to be more complex compared to the previous version (v3).
In addition, a disclaimer on the site states that the documentation is still being updated and new SDKs are in development, adding to the existing complexities. Despite this, I am working on upgrading my PHP version to 5.6 in hopes of resolving any remaining error messages.
Following the PHP upgrade to version 5.5, I managed to get smsgateway.me up and running smoothly. By downloading the required program files from https://github.com/smsgatewayme/client-php, I was able to integrate the necessary components seamlessly.
require_once(__DIR__ . '/autoload.php');
use SMSGatewayMe\Client\ApiClient;
use SMSGatewayMe\Client\Configuration;
use SMSGatewayMe\Client\Api\MessageApi;
use SMSGatewayMe\Client\Model\SendMessageRequest;
$clients = new SMSGatewayMe\Client\ClientProvider(
"your key from website"
);
$sendMessageRequest = new SMSGatewayMe\Client\Model\SendMessageRequest
([
'phoneNumber' => $HAMiLote['HASMSTel'],
'message' => $AXMessage, 'deviceId' => 100701
]);
$sentMessages =
$clients->getMessageClient()->sendMessages([$sendMessageRequest]);
?><pre><?php print_r($sentMessages); ?></pre><?php