PHP code example of jgodish / mblox-mms-xml-client

1. Go to this page and download the library: Download jgodish/mblox-mms-xml-client 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/ */

    

jgodish / mblox-mms-xml-client example snippets




$mblox = \Mblox\Mms\Xml\Client('your_api_key', 'short_code');
$slide = (new \Mblox\Mms\Xml\Slide)->setImage('http://www.yoursite.com/images/1.jpg')->setMessageText('This is some text for your slide');
$response = $mblox->mms()->send('mytestmms', '15555555555', [$slide], 'This is some fallback text');

$mblox = \Mblox\Mms\Xml\Client('your_api_key', 'short_code');
$slide = (new \Mblox\Mms\Xml\Slide)->setImage('http://www.yoursite.com/images/1.jpg')->setMessageText('This is some text for your slide');

$response = $mblox->mms()->send('mytestmms', '15555555555', [$slide], 'This is some fallback text');

// Check for successful response
$response->isSuccessful();

// Convert response to an array
$response->toArray();

// Get string representation of the response
$response->toString();

$mblox = \Mblox\Mms\Xml\Client('your_api_key', 'short_code');
$slide = (new \Mblox\Mms\Xml\Slide)->setImage('http://www.yoursite.com/images/1.jpg')->setMessageText('This is some text for your slide');
$mblox->mms()->save('mytestmms', 'Message Subject', [$slide]);

$mblox = \Mblox\Mms\Xml\Client('your_api_key', 'short_code');
$ddm = new \Mblox\Mms\Xml\DeviceDiscovery('This message is free of charge and will allow us to deliver your content nice and smooth');
$mblox->mms()->sendSaved('mms_id', '15555555555', 'This is some fallback text', $ddm);

$mblox = \Mblox\Mms\Xml\Client('your_api_key', 'short_code');
$slide = (new \Mblox\Mms\Xml\Slide)->setImage('http://www.yoursite.com/images/1.jpg')->setMessageText('This is some text for your slide');
$mblox->mms()->send('mytestmms', '15555555555', [$slide], 'This is some fallback text');

$mblox = \Mblox\Mms\Xml\Client('your_api_key', 'short_code');
$mblox->mms()->delete('mms_id');

$mblox = \Mblox\Mms\Xml\Client('your_api_key', 'short_code');
$mblox->mms()->getTemplates();