Page 7 of 7

Re: API and HTML Examples

Posted: Thu Oct 24, 2013 1:09 am
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..

Re: API and HTML Examples

Posted: Wed Dec 02, 2015 4:44 am
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?

Re: API and HTML Examples

Posted: Wed Dec 02, 2015 10:27 am
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.

Re: API and HTML Examples

Posted: Wed Dec 02, 2015 7:08 pm
by narayan
Hi,

just a quick question:

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


thank you

Re: API and HTML Examples

Posted: Wed Dec 02, 2015 7:40 pm
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;

Re: API and HTML Examples

Posted: Thu Dec 03, 2015 2:08 pm
by narayan
Great, thank you!