lildamien09 wrote:Okay i have been playing around with the api in which ever way i can figure out and im clue less.. im trying to display in my bank section on my site the balance of the current user logged in.. I have there bank balanca and the other is balance in game.. the balance in game which would be called via api.. how would i call this balance via api by itself.. any suggestions??
lildamien09 wrote:well i know i can do that.. but i only want to display the balance by itself and not for me..its for the player who is logged into the bank on my site..so they can see there own balance and decide how much money they want to deposit into there savings account. (i.e call the balance via api.. and echo it with my php function to show it in there bank account info..)
lildamien09 wrote:i tried using the account get command to retrieve the balance of xuser and using php function bbalance=balance and echoing balance to page but i guess im doing something wrong as far as calling the balance using api commands.. if im able to call the balance alone using api in a php page, could you give me an example code of this action..
include "API.php";
$player = "test";
$params = "Password=" . $pw . "&Command=AccountsGet&Player=" . $player;
$api = Poker_API($url,$params,true);
$result = $api["Result"];
if ($result == "Error") die("Error: " . $api["Error"]);
$balance = $api["Balance"];
echo "Current balance for " . $player . " is " . $balance;
$check = mysql_query("SELECT * FROM xbankx WHERE xusername = '$username'")or die(mysql_error());
include "API.php";
$player = "$username";
$params = "Password=" . $pw . "&Command=AccountsGet&Player=" . $player;
$api = Poker_API($url,$params,true);
$result = $api["Result"];
if ($result == "Error") die("Error: " . $api["Error"]);
$balance = $api["Balance"];
<?php echo $balance; ?>
Users browsing this forum: No registered users and 4 guests