Login   Register  
PHP Classes
elePHPant
Icontem

File: getinboxes.php

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in del.icio.us Bookmark in del.icio.us
  Classes of Andy Dixon  >  Textlocal  >  getinboxes.php  >  Download  
File: getinboxes.php
Role: Example script
Content type: text/plain
Description: Get Inboxes
Class: Textlocal
Send SMS or MMS messages using Textlocal API
Author: By
Last change:
Date: 2013-07-15 23:37
Size: 667 bytes
 

Contents

Class file image Download
<?php
require('../textlocal.class.php');

$textlocal = new Textlocal('demo@txtlocal.com''apidemo123');

$groupId 228839;
$startPos 0;
$limit 1000;

try {
    
$result $textlocal->getContacts($groupId$limit$startPos);

    
/** Loop through contacts */
    
foreach ($result->contacts as $contact) {
        
$number $contact->number;
        
$firstName $contact->first_name;
        
$lastName $contact->last_name;
        
$custom1 $contact->custom1;
        
$custom2 $contact->custom2;
        
$custom3 $contact->custom3;
    }

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