Gambling system

I will have some games that will be instant winable and I need a formula creating for this system.

I want to payout 90% of all takings (Not all in one go though) (This must be configurable) with odds at 4 to 1 (i.e. 4 plays 1 win) so that payouts are quite a good sum of money (Again the odds must be configureable).

All the games will cost either &pound;1, &pound;2, &pound;4 or &pound;8 depending on the jackpots for the games.

There must be a full audit trail for this including, game name, player id, value paid, value won, the players account balance afterwards, game balance after payout etc

I will need a simple api (Could be a simple php script) so that the flash/java games can interface this system.

e.g. Lets say the game is naughts and crosses.... then there would be 9 options so &quot;0&quot; can be zeros and &quot;x&quot; can be ones this would then enable a flash game to get its configuration.

The maximum options in a game will be 50.

x0x

00x

0xx

I am develpoing the portal for this so it will need to intergrate it into that.

I would prefer someone who has experience of this type of development.