Page 1 of 1
Tournaments list
Posted: Sat Feb 12, 2011 11:56 am
by narayan
Hello again,
I was wandering if somebody is nice to post a code of listing the tournements on a webpage
Thank you !
Re: Tournaments list
Posted: Sat Feb 12, 2011 3:02 pm
by Kent Briggs
narayan wrote:
I was wandering if somebody is nice to post a code of listing the tournements on a webpage
This will display a simple list with the name, buy-in, and status:
Code: Select all
<html>
<body>
<?php
include "API.php";
$params = "Password=" . $pw . "&Command=TournamentsList&Fields=Name,BuyIn,EntryFee,Status";
$api = Poker_API($url,$params,true);
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["EntryFee".$i] .
") " . $api["Status".$i] . "<br>";
?>
</body>
</html>
Re: Tournaments list
Posted: Sat Feb 12, 2011 3:32 pm
by narayan
Perfect, exactly what I needed. Thx