Skip to content

Instantly share code, notes, and snippets.

@underscorephil
Created June 21, 2013 18:29
Show Gist options
  • Save underscorephil/5833257 to your computer and use it in GitHub Desktop.
Save underscorephil/5833257 to your computer and use it in GitHub Desktop.
<?php
include('softlayer-api-php-client/SoftLayer/SoapClient.class.php');
$apiUser = '';
$key = '';
$accountClient = SoftLayer_SoapClient::getClient('SoftLayer_Account', null, $apiUser, $key);
$objectMask = "mask[id,modifyDate]";
$accountClient->setObjectMask($objectMask);
$tickets = $accountClient->getTickets();
$limit = 10;
$offset = 0;
$allTickets = array();
while (TRUE) {
$accountClient->setResultLimit($limit, $offset);
$tickets = $accountClient->getTickets();
if (count($tickets) < 1)
break;
$allTickets = array_merge($allTickets, $tickets);
$offset += $limit;
}
print_r($allTickets);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment