Test

[insert_php]
// Create TabT API client
$tabt = new SoapClient(“https://ttonline.sporta.be/api/?wsdl”);

// Prepare Test request
$Credentials = array(‘Account’ => ‘ze.vandenhoeck’,
‘Password’ => ‘glimlachendewipneus’);

// Get ranking from a given division
$Response = $tabt->GetDivisionRanking(
array(‘Credentials’ => $Credentials,
‘DivisionId’ => 954));

/// Use PEAR::HTML_Table to render ranking table
require_once(‘HTML/Table.php’);
$table = new HTML_Table();

// Loop through received entries of the ranking and prepare
// the table to be displayed
$table->addRow(array(‘Position’, ‘Team’, ‘GamesPlayed’, ‘Points’), null, ‘th’ );
foreach ($Response->RankingEntries as $RankingEntry)
{
$table->addRow(array($RankingEntry->Position,
$RankingEntry->Team,
$RankingEntry->GamesPlayed,
$RankingEntry->Points));
}

// Render HTML table
print(‘

‘.$Response->DivisionName.’

‘);
print($table->toHtml());
[/insert_php]