Kent Briggs wrote:MonTheHoops wrote:Like how many people are currently connected
<?php
include "API.php";
$params = "Password=" . $pw . "&Command=ConnectionsList";
$api = Poker_API($url,$params);
if ($api["Result"] == "Error") die("Error: " . $api["Error"]);
echo "The number of connections is " . $api["Connections"];
?>
what tournaments are available
<?php
include "API.php";
$params = "Password=" . $pw . "&Command=TournamentsList&Fields=Name,BuyIn,Status";
$api = Poker_API($url,$params);
if ($api["Result"] == "Error") die("Error: " . $api["Error"]);
$n = $api["Tournaments"];
echo "<b>Tournaments Available</b><br>";
for($i=1;$i<=$n;$i++) echo $api["Name".$i] . " - " . $api["BuyIn".$i] . " - " . $api["Status".$i] . "<br>";
?>
who is currently winning the tournament?
<?php
include "API.php";
$tname = "Tournament #1";
$params = "Password=" . $pw . "&Command=TournamentsPlaying&Name=" . urlencode($tname);
$api = Poker_API($url,$params);
if ($api["Result"] == "Error") die("Error: " . $api["Error"]);
if (isset($api["Rank1"])) echo "Chip leader for " . $tname . " is " . $api["Player1"] . " (" . $api["Chips1"] . ")";
else echo $tname . " is not running";
?>