API and HTML Examples

For discussion of the Poker Mavens server module and other administration topics
Post Reply
lildamien09
Posts: 72
Joined: Sun Sep 13, 2009 7:08 pm
Location: TX

Re: API and HTML Examples

Post by lildamien09 »

You Know.. I have to say.. over the years i have done alot of different thing with the poker mavens api.. and its just freakin brilliant of the amount of things and ideas you can come up with and make happen whithin your website.. today i manage to make the api and php code work together to verify if user exists in server and comfirm player name and password, and if exists via api, but doesnt exist in data base, accoungets user data and inserts to sql, else if player exists in both then login and create session via api and via website.. just amazing.. almost like an account import.. and i realize the passwords are hashed so you cant import a password for the user existing in pokermavens and insert it in a database, so what i did was after password was verified i used the same url encode PW in the insert into sql code else if not veried trY AGAIN..
social
Posts: 211
Joined: Fri Nov 20, 2009 12:23 am

Re: API and HTML Examples

Post by social »

I want to use Tournaments that will start as soon as all the seats are full.
When the Tourney starts, how can I send a list of all of the Players to my phpbased website, to be posted in a leaderboard created on that site which will be tracking certain other variables at the same time?
Kent Briggs
Site Admin
Posts: 5878
Joined: Wed Mar 19, 2008 8:47 pm

Re: API and HTML Examples

Post by Kent Briggs »

social wrote:I want to use Tournaments that will start as soon as all the seats are full.
When the Tourney starts, how can I send a list of all of the Players to my phpbased website, to be posted in a leaderboard created on that site which will be tracking certain other variables at the same time?
Use the Callback Event system and enable the "Tournament start event". Grab the name from the parameters and call TournamentsPlaying in the API to get your list of players and chip counts.
narayan
Posts: 13
Joined: Wed Dec 08, 2010 6:04 am

Re: API and HTML Examples

Post by narayan »

Hi,

just a quick question:

How can I get a specific user`s balance in php


thank you
Kent Briggs
Site Admin
Posts: 5878
Joined: Wed Mar 19, 2008 8:47 pm

Re: API and HTML Examples

Post by Kent Briggs »

narayan wrote:How can I get a specific user`s balance in php
Call AccountsGet in the API like this:

Code: Select all

$player = "Aces123";
$params = array("Command" => "AccountsGet", "Player" => $player);
$api = Poker_API($params);
if ($api -> Result == "Ok") echo "The chip balance for " . $player . " is " . $api -> Balance;
else echo "Error: " . $api -> Error;
narayan
Posts: 13
Joined: Wed Dec 08, 2010 6:04 am

Re: API and HTML Examples

Post by narayan »

Great, thank you!
Post Reply