API and HTML Examples

For discussion of the Poker Mavens server module and other administration topics

Re: API and HTML Examples

Postby lildamien09 » Thu Oct 24, 2013 1:09 am

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..
lildamien09
 
Posts: 71
Joined: Sun Sep 13, 2009 7:08 pm
Location: TX

Re: API and HTML Examples

Postby social » Wed Dec 02, 2015 4:44 am

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?
social
 
Posts: 194
Joined: Fri Nov 20, 2009 12:23 am

Re: API and HTML Examples

Postby Kent Briggs » Wed Dec 02, 2015 10:27 am

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.
Kent Briggs - [email protected]
Briggs Softworks - http://www.briggsoft.com
Kent Briggs
Site Admin
 
Posts: 3754
Joined: Wed Mar 19, 2008 8:47 pm

Re: API and HTML Examples

Postby narayan » Wed Dec 02, 2015 7:08 pm

Hi,

just a quick question:

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


thank you
narayan
 
Posts: 13
Joined: Wed Dec 08, 2010 6:04 am

Re: API and HTML Examples

Postby Kent Briggs » Wed Dec 02, 2015 7:40 pm

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;
Kent Briggs - [email protected]
Briggs Softworks - http://www.briggsoft.com
Kent Briggs
Site Admin
 
Posts: 3754
Joined: Wed Mar 19, 2008 8:47 pm

Re: API and HTML Examples

Postby narayan » Thu Dec 03, 2015 2:08 pm

Great, thank you!
narayan
 
Posts: 13
Joined: Wed Dec 08, 2010 6:04 am

Previous

Return to Site Administration

Who is online

Users browsing this forum: No registered users and 3 guests

cron