Tournaments list

For discussion of the Poker Mavens server module and other administration topics
Post Reply
narayan
Posts: 13
Joined: Wed Dec 08, 2010 6:04 am

Tournaments list

Post by narayan »

Hello again,
I was wandering if somebody is nice to post a code of listing the tournements on a webpage
Thank you !
Kent Briggs
Site Admin
Posts: 5878
Joined: Wed Mar 19, 2008 8:47 pm

Re: Tournaments list

Post 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>
narayan
Posts: 13
Joined: Wed Dec 08, 2010 6:04 am

Re: Tournaments list

Post by narayan »

Perfect, exactly what I needed. Thx
Post Reply