JAMESOMIGHTY Posted January 4, 2010 Posted January 4, 2010 just edited the previous chest post so you can buy extra keys, it works for v2 and it should for v1 if it doesnt just say and i will sort it :) remember i did not make this mod just edited it chests.php You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. chest.png chest2.png Quote
Joshua Posted January 4, 2010 Posted January 4, 2010 Not to horrible few suggestions. Dont use "die" int isnt going to fully secure the GET variable, use abs int otherwise you deal with +9999999999999999- or -99999999999999 type bugs. $_GET[tea has no security on it at all. If i was at home I'd do a quick recode of it to tidy it up BUT. Nice Job all together :) Everything is a learning experience :) Quote
JAMESOMIGHTY Posted January 4, 2010 Author Posted January 4, 2010 i've only been coding for 2 months so i'm still getting the hang of things so thanks for the advice :D Quote
Joshua Posted January 4, 2010 Posted January 4, 2010 Np and yw. Above all else make sure your $_GET and $_POST variables are secured on input/output. Stops common exploits/injections I use the @ operator which some argue about it slowing down a site a bit but i've never noticed a huge differance for an integer you have (int) $_POST['integer']) Try making sure that not only is it an Integer but that it's a Postive Integer. abs((int) $_POST['integer']); or abs(@intval($_POST['integer'])); there are other ways but lets keep it simple :D Hope that helps Quote
Zero-Affect Posted January 4, 2010 Posted January 4, 2010 die isn't so bad i mean if your not wanting to post anything after it then by all means use die or exit but you could also do You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. im not so sure on register_shutdown_function so i won't try and explain that one in much detail, but i believe it's basically the above. Quote
rulerofzu Posted January 5, 2010 Posted January 5, 2010 Here. As it says I got bored and I havnt had a 2nd cuppa coffee or brekky so cant be bothered to take it any further or correct anything further. Would have been easier just to write a new one from scratch and I dont know why i just wasted my time on this lmao Oh and i changed the images to gifs as thats how they downloaded at the time. You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. Quote
Danny696 Posted January 5, 2010 Posted January 5, 2010 No need for that switch, a simple if(isset($_GET['x'])) would do fine Quote
rulerofzu Posted January 5, 2010 Posted January 5, 2010 Yeah i was in the process of changing everything to be in functions but then the boredom hit :D 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.