2017 © Pedro Peláez
 

library imasys-php

PHP Wrapper for Swissphone's IMASYS Mobile Messaging SMS-Service

image

comsolit/imasys-php

PHP Wrapper for Swissphone's IMASYS Mobile Messaging SMS-Service

  • Monday, August 24, 2015
  • by comsolit
  • Repository
  • 9 Watchers
  • 0 Stars
  • 50 Installations
  • PHP
  • 1 Dependents
  • 0 Suggesters
  • 0 Forks
  • 2 Open issues
  • 2 Versions
  • 0 % Grown

The README.md

THIS REPO IS UNMAINTAINED / A NEW MAINTAINER IS NEEDED

IMASYS PHP

IMASYS PHP is a PHP wrapper for the IMASYS XML API from Swissphone. Current capabilities are sending SMS messages and checking the message status., (*1)

Example: Send a text message and get message status

1. Enter credentials

$credentials = new Credentials('<YOUR_IMASYS_USER_ID>', '<YOUR_IMASYS_PASSWORD>');

2. Fetch portal list

$portalServers = PortalServers::fetchPortalServers($config['host'], $credentials);

3. Initialize connection

$connection = new Connection($credentials, $portalServers);

4. Send message

$sendMessageRequest = new SendMessageRequest('<THE MESSAGE>', '<PHONE_NUMBER>', '<ORIGINATOR_NAME>');
$sendMessageResponse = $connection->send($sendMessageRequest);

5. Get message status

sleep(10);
$batchStatusRequest = new BatchStatusRequest($sendMessageResponse->getBatchId());
$batchStatusResponse = $connection->send($batchStatusRequest);

foreach ($batchStatusResponse->getBatch()->getMessages() as $message) {
    print_r($message->getStatus());
}

The reason the sleep function is called is to wait for the message to arrive on the target., (*2)

References

The Versions

24/08 2015

dev-master

9999999-dev https://github.com/comsolit/imasys-php

PHP Wrapper for Swissphone's IMASYS Mobile Messaging SMS-Service

  Sources   Download

MIT

The Requires

  • php >=5.4.0

 

24/08 2015

v1.0.3

1.0.3.0 https://github.com/comsolit/imasys-php

PHP Wrapper for Swissphone's IMASYS Mobile Messaging SMS-Service

  Sources   Download

MIT

The Requires

  • php >=5.4.0