Page 1 of 1

Show Balance Chip API ??

Posted: Mon Dec 12, 2011 2:03 pm
by Gamebler
hi kent , i want Show Balance Chip API php code tnx

Re: Show Balance Chip API ??

Posted: Mon Dec 12, 2011 2:42 pm
by Kent Briggs
Gamebler wrote:hi kent , i want Show Balance Chip API php code tnx
Just call the AccountsGet function in the API with the player's name passed in a parameter called "Player". You can also confirm their password like I show here:

Code: Select all

<?php
  include "API.php";  // API password assigned to $pw in here

  $player = "TEST";   // assume these values retrieved from input form
  $playerpw = "123456";

  $params = "Password=" . $pw . "&Command=AccountsGet&Player=" . $player;
  $api = Poker_API($url,$params,true);
  $result = $api["Result"];
  if ($result == "Error") die("Error: " . $api["Error"]);
  if ($api["PW"] != $playerpw) die("Password is incorrect");
  echo "Chip balance for " . $player . " is " . $api["Balance"];
?>

Re: Show Balance Chip API ??

Posted: Mon Dec 12, 2011 3:38 pm
by Gamebler
tnx ,but i want when player login automatic show chip balance and chip in play

Re: Show Balance Chip API ??

Posted: Mon Dec 12, 2011 3:49 pm
by Gamebler
or if any link for open automatic Chip Balance program... tnQ

Re: Show Balance Chip API ??

Posted: Mon Dec 12, 2011 4:14 pm
by Kent Briggs
Gamebler wrote:tnx ,but i want when player login automatic show chip balance and chip in play
You cannot modify the player client GUI with the API. And there is already a show balance button built into it anyway. To do what you want to do, you will need to create your own web-based login system, where you embed the player client in an iframe and display your own info in the surrounding area.

Re: Show Balance Chip API ??

Posted: Mon Dec 12, 2011 4:21 pm
by Gamebler
ooo tanx, sorry i have a last question, i want API for Todays Big Winner which show cards tnQ if you answered this ?

Re: Show Balance Chip API ??

Posted: Mon Dec 12, 2011 4:35 pm
by Kent Briggs
Gamebler wrote:ooo tanx, sorry i have a last question, i want API for Todays Big Winner which show cards tnQ if you answered this ?
That would require writing a program that parsed through the hand history files and calculated those kind of stats. It's doable but not a trivial task. The API call for retrieving a hand history file is LogsHandHistory, which is documented in the help file. There's also some example code for retrieving a hand history file on the API examples page:

http://www.briggsoft.com/docs/pmavens/API_Examples.htm

Re: Show Balance Chip API ??

Posted: Thu Mar 22, 2012 12:43 pm
by fafafa
Kent Briggs wrote:
Gamebler wrote:tnx ,but i want when player login automatic show chip balance and chip in play
You cannot modify the player client GUI with the API. And there is already a show balance button built into it anyway. To do what you want to do, you will need to create your own web-based login system, where you embed the player client in an iframe and display your own info in the surrounding area.
Hi Kent how i can use own web-based login system??!

Re: Show Balance Chip API ??

Posted: Thu Mar 22, 2012 12:52 pm
by Kent Briggs
fafafa wrote: Hi Kent how i can use own web-based login system??!
There are multiple ways, all involve writing code on your web site to prompt for a user name and password, then authenticate that against your own database or via API calls to the Poker Mavens server. A couple of simple examples are posted on the API example page in the Automated Login section:

http://www.briggsoft.com/docs/pmavens/API_Examples.htm