Hiiiiiiiiiiiii
Well, we got a problem with api command AccountsIncBalance , can I have a sample php code to how to use it?or a good reference for it
Regards
API command sample for php?
-
- Site Admin
- Posts: 5880
- Joined: Wed Mar 19, 2008 8:47 pm
Re: API command sample for php?
The API docs in the help file show:kingprado wrote: Well, we got a problem with api command AccountsIncBalance , can I have a sample php code to how to use it?or a good reference for it
AccountsIncBalance - increments the account balance of a player. Use a Player parameter to specify the player's name and an Amount parameter to specify the number of chips to add to the account. A "Balance" parameter is returned in the result indicating the player's new chip balance. This command is safe to use even while the player is logged in and playing.
What problem are you having?
Re: API command sample for php?
Kent Briggs wrote:The API docs in the help file show:kingprado wrote: Well, we got a problem with api command AccountsIncBalance , can I have a sample php code to how to use it?or a good reference for it
AccountsIncBalance - increments the account balance of a player. Use a Player parameter to specify the player's name and an Amount parameter to specify the number of chips to add to the account. A "Balance" parameter is returned in the result indicating the player's new chip balance. This command is safe to use even while the player is logged in and playing.
What problem are you having?
Actually I want to wrote a code for increasing the account amount but If I had a sample from one of the php samples for such api commands ( which it is correct and it's working , I could use all of commands easily....)
Thanks
-
- Site Admin
- Posts: 5880
- Joined: Wed Mar 19, 2008 8:47 pm
Re: API command sample for php?
Code: Select all
<?php
include "API.php";
$player = "test";
$amount = 10;
$params = array("Command" => "AccountsIncBalance", "Player" => $player, "Amount" => $amount);
$api = Poker_API($params);
if ($api -> Result == "Error") die("Error: " . $api -> Error);
echo $amount . " chips added to balance for " . $player;
?>
Re: API command sample for php?
Thank you for your ur kindness
May I have another sample for AccountsEdit command? I'm confused...
May I have another sample for AccountsEdit command? I'm confused...
-
- Site Admin
- Posts: 5880
- Joined: Wed Mar 19, 2008 8:47 pm
Re: API command sample for php?
Have you ever written PHP code (or any code before)?
Code: Select all
<?php
include "API.php";
$player = "test";
$location = "Houston";
$params = array("Command" => "AccountsEdit", "Player" => $player, "Location" => $location);
$api = Poker_API($params);
if ($api -> Result == "Error") die("Error: " . $api -> Error);
echo "Location for " . $player . " changed to " . $location;
?>
Re: API command sample for php?
Hi again,
May I have another example for Valcode command to verify account? And I want to use this code in my login page which I made it,May I have some guidance?I mean I want to make another form in my login page to be used for only Valcode to verify user's emails...
Best wishes
May I have another example for Valcode command to verify account? And I want to use this code in my login page which I made it,May I have some guidance?I mean I want to make another form in my login page to be used for only Valcode to verify user's emails...
Best wishes
-
- Site Admin
- Posts: 5880
- Joined: Wed Mar 19, 2008 8:47 pm
Re: API command sample for php?
Same as above except replace "Location" with "ValCode" or whatever property you want to edit. All the property names are documented in the API section of the help file.kingprado wrote:May I have another example for Valcode command to verify account?