PHP Classes

File: getgroups.php

Recommend this page to a friend!
  Classes of Andy Dixon   Textlocal   getgroups.php   Download  
File: getgroups.php
Role: Example script
Content type: text/plain
Description: Get Groups
Class: Textlocal
Send SMS or MMS messages using Textlocal API
Author: By
Last change:
Date: 11 years ago
Size: 440 bytes
 

Contents

Class file image Download
<?php
require('../textlocal.class.php');
$textlocal = new Textlocal('demo@txtlocal.com', 'apidemo123');

try {
   
$result = $textlocal->getGroups();

   
/** Loop through groups */
   
foreach ($result->groups as $group) {
       
$groupName = $group->name;
       
$groupId = $group->id;
       
$groupSize = $group->size;
    }

   
print_r($result);
} catch (
Exception $e) {
    die(
'Error: ' . $e->getMessage());
}
?>