Cashout
Posted: Sat May 21, 2011 4:17 pm
Hello, used the default form for decrement..
here the administrator decrement the users chips and save a log on a database..
but i need the player to write his password in the form or the code stop. any help ?
$curl_connection = curl_init('http://localhost:8087/api');
curl_setopt($curl_connection, CURLOPT_CONNECTTIMEOUT, 30);
curl_setopt($curl_connection, CURLOPT_USERAGENT, "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1)");
curl_setopt($curl_connection, CURLOPT_RETURNTRANSFER, true);
curl_setopt($curl_connection, CURLOPT_SSL_VERIFYPEER, false);
curl_setopt($curl_connection, CURLOPT_FOLLOWLOCATION, 1);
$post_data['Command'] = 'AccountsDecBalance';
$post_data['Player'] = "$user";
$post_data['Amount'] = "$chips";
$post_data['Password'] = 'apipass';
foreach ( $post_data as $key => $value)
{
$post_items[] = $key . '=' . $value;
}
$post_string = implode ('&', $post_items);
curl_setopt($curl_connection, CURLOPT_POSTFIELDS, $post_string);
$result = curl_exec($curl_connection);
curl_close($curl_connection);
echo "$chips chips has been cashed out from $user <br> <a href=menu.php >Main Menu</a>";
?></center>
here the administrator decrement the users chips and save a log on a database..
but i need the player to write his password in the form or the code stop. any help ?
$curl_connection = curl_init('http://localhost:8087/api');
curl_setopt($curl_connection, CURLOPT_CONNECTTIMEOUT, 30);
curl_setopt($curl_connection, CURLOPT_USERAGENT, "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1)");
curl_setopt($curl_connection, CURLOPT_RETURNTRANSFER, true);
curl_setopt($curl_connection, CURLOPT_SSL_VERIFYPEER, false);
curl_setopt($curl_connection, CURLOPT_FOLLOWLOCATION, 1);
$post_data['Command'] = 'AccountsDecBalance';
$post_data['Player'] = "$user";
$post_data['Amount'] = "$chips";
$post_data['Password'] = 'apipass';
foreach ( $post_data as $key => $value)
{
$post_items[] = $key . '=' . $value;
}
$post_string = implode ('&', $post_items);
curl_setopt($curl_connection, CURLOPT_POSTFIELDS, $post_string);
$result = curl_exec($curl_connection);
curl_close($curl_connection);
echo "$chips chips has been cashed out from $user <br> <a href=menu.php >Main Menu</a>";
?></center>