Akash Posted May 22, 2009 Posted May 22, 2009 Hey guys, One of my simplest mods, I had a bit of time to spare so here it is: Details: All you need to do is bet up to $500,000 and choose heads or tails. If the coin lands on the correct one, you win double. If not, you lose your bet cash. No images, only text. Version: V2 (2.0.0) You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. You must upload with any filename and add a link in casino/wherever you find appropriate. Enjoy. No bugs so far, but if you do find any, please post. Quote
Akash Posted May 22, 2009 Author Posted May 22, 2009 Re: [V2]Coin Toss Modification Nice idea +1 Thanks Quote
gideon prewett Posted May 22, 2009 Posted May 22, 2009 Re: [V2]Coin Toss Modification as its "one of ur simplest mods" why not make it so u bet against another user like russian roulett but without being put in hosp Quote
Akash Posted May 22, 2009 Author Posted May 22, 2009 Re: [V2]Coin Toss Modification as its "one of ur simplest mods" why not make it so u bet against another user like russian roulett but without being put in hosp Nice idea, I'll do that if I get some time. :) Quote
Raptor_Jesus Posted May 24, 2009 Posted May 24, 2009 Re: [V2]Coin Toss Modification I just skimmed this so Im not 100% sure but are you missing a and if here if the user doesnt have enough money? Quote
Raptor_Jesus Posted May 24, 2009 Posted May 24, 2009 Re: [V2]Coin Toss Modification One more little thing I never messed with is_numeric before I prefer other methods but looking into it on php.net I saw the following ////////////the following is not mine but from php.net Some examples. Note that leading white space is OK, but not trailing white space, and there can't be white space between the "-" and the number. is_numeric("1,000") = F is_numeric("1e2") = T is_numeric("-1e-2") = T is_numeric("1e2.3") = F is_numeric("1.") = T is_numeric("1.2") = T is_numeric("1.2.3") = F is_numeric("-1") = T is_numeric("- 1") = F is_numeric("--1") = F is_numeric("1-") = F is_numeric("1A") = F is_numeric(" 1") = T is_numeric("1 ") = F Quote
Karlos Posted May 24, 2009 Posted May 24, 2009 Re: [V2]Coin Toss Modification Why not use ctype_digit()? Edit: You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. What are you trying to achieve there? :lol: Quote
Karlos Posted May 24, 2009 Posted May 24, 2009 Re: [V2]Coin Toss Modification You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. Could try that :wink: Quote
Hawk Posted May 24, 2009 Posted May 24, 2009 Re: [V2]Coin Toss Modification theres an error as i can bet money without having it in my hand Quote
Karlos Posted May 24, 2009 Posted May 24, 2009 Re: [V2]Coin Toss Modification Who's code? Because Mine prevents it as far as I know. Quote
Rainbow Posted May 24, 2009 Posted May 24, 2009 Re: [V2]Coin Toss Modification As some one mentioned you should include ctype_digit as it will check for numeric characters. As ctype_digit only functions correctly on strings. Cast your vars to string before you test them. Also, be wary and only use ctype_digit if you're sure your var contains either a string or int, as boolean true for ex will convert to int 1. To be truly safe, you need to check the type of the var first. Also make sure you know which command to use for example is_int() returns true if the argument is an integer type, ctype_digit() takes a string argument and returns true if all the characters in the string are digits; is_int: ctype_digit: 123 true false 12.3 false false "123" false true "12.3" false false So then it is up to you to consider what is trying to be done and which one would be more useful. If you don't really care if the argument is a int type or a string with numbers, use is_numeric. I can see a few vulnerabilities in the code... But I will leave that up to you to see and sort out. :) Quote
Akash Posted May 24, 2009 Author Posted May 24, 2009 Re: [V2]Coin Toss Modification I just skimmed this so Im not 100% sure but are you missing a and if here if the user doesnt have enough money? Sorry about that, I'm just changing that now. Quote
Raptor_Jesus Posted May 24, 2009 Posted May 24, 2009 Re: [V2]Coin Toss Modification if(eregi("[^0-9]", $_POST['money'])) { echo"You tool"; return; } Quote
Haunted Dawg Posted May 24, 2009 Posted May 24, 2009 Re: [V2]Coin Toss Modification As far as i know, ereg* is deprecated as of php 6.0 Quote
Rainbow Posted May 24, 2009 Posted May 24, 2009 Re: [V2]Coin Toss Modification I also believe the PHP 6.0 release issued the removal of obsolete extensions such as ereg extensions, the others that were deprecated were 'register_globals', 'magic_quotes' and 'safe_mode' Quote
Raptor_Jesus Posted May 24, 2009 Posted May 24, 2009 Re: [V2]Coin Toss Modification Anyone here using 6.0? Quote
Haunted Dawg Posted May 24, 2009 Posted May 24, 2009 Re: [V2]Coin Toss Modification Many are upgrading to 6.0 as soon as it releases, it's more stable and "romours" say that it will be faster. Quote
Raptor_Jesus Posted May 24, 2009 Posted May 24, 2009 Re: [V2]Coin Toss Modification I'll give the docs on it a read then Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.