PDA

View Full Version : PHP Game: kiss the mortog kind of script


Sagashiteru
12-23-2007, 07:18 AM
So I was bored and make this really fast,
I have no use for it though.

In this game you just have to guess which doors doesn't have a dead end.
You can set the price, how many levels there are(of course also the image you're going to use XD).
I aded security against cheaters XD

http://thorpion.com/doors.php

there's the live script,
here's an example code:

if ($act == '1'){
//$q = mysql_query("UPDATE users SET points='$points-50' WHERE user='$user'");
$total_amount = '0';
$amount = '0';
}
$_SESSION['doors'] = $act;
$amount_doors = $act+1;
$select = mt_rand(1, $amount_doors);
$amount_won = $act*200;
$total_amount = $amount+$amount_total;
$html = PrintDoors($amount_doors, $select, $amount_won, $total_amount);
$html .= <<<Html
<p>
you have $total_amount in your prizebox.
<form action="?act=done" method="POST">
<input type="hidden" name="amount_total" value="$total_amount">
<input type="submit" value="Collect your $total_amount bucks">
</form>
</p>
Html;
echo $html;
}


Since it something that I really don't need I'll put the starting bid at $2

-Lewis-
12-23-2007, 03:20 PM
$2 sb

dc277
12-23-2007, 03:57 PM
It's not very secure (Unless the example you are showing is not the one your selling.).

Users can look at the source code and figure out which door works by the
form action="?act=X" <- Works
form action="?act=lose" <- They Lose.

tezeti
12-23-2007, 05:40 PM
Is the fruit image included with the game?

renlok
01-02-2008, 10:56 AM
$4 bid

Awakening
01-02-2008, 10:14 PM
Like dc277 said, anybody can look at the source code to figure out which is the correct door.
Why client side?

You guys should wait for him/her to fix it up before buying it.

Patrick
01-08-2008, 12:08 AM
What do you expect for $2?

juddster
01-08-2008, 05:04 PM
you have 9999999999 in your prizebox.

That is after one round of me playing around with it...to be perfectly honest it isn't even worth 2$...maybe .10$ but thats it...

~juddster

Jooshypnut
01-11-2008, 01:56 AM
haha Juddster, breaking things is your specialty.... *wanders off laughing.....

Blacksun
01-11-2008, 08:19 AM
You don't have to be an expert to do this. You just need something that lets you spoof POST data *pats Tamper Data extension*

juddster
01-11-2008, 03:07 PM
Or you could make everything go through the database. You hit door 5 and you should be able to pick up oh wait...you aren't allowed to go there yet...or you are trying to screw us...that is what I decided to do for Cyopets' version of the game...

~juddster