sfekt` Posted October 1, 2006 Posted October 1, 2006 In lots of games without validations, many users will have bots training and doing crimes for them, so I have coded a validation mod. Step 1 - MySQL Fields: In the users table, create the following fields: valtries (int) 11 validation (int) 11 NOTE: Remember to add these 2 fields to the register.php when inserting new users. Step 2 - The Files: validate.php ------------- You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. img.php -------- You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. Step 3 - Editing Cron Jobs: Locate "cron_hp.php" and add the following line: You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. Step 4 - Redirecting to validate.php: In the files you like the users to validate before using (ie: gym.php, docrime.php), locate the line "$lv=date('F j, Y, g:i a',$ir['laston']);" and directly underneath, paste this: You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. Any bugs/suggestions? Post it here. Quote
spellbyte ® Posted October 1, 2006 Posted October 1, 2006 validation mod thankyou so much for posting one of these, got a few questions though 1: how often does the cron need to be updated, i ask cos i haven't got a cron file called that, 2when i succesfuly enter the correct number, it says You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. and then it just stays on that page, how can this be fixed? Quote
S0UL Posted October 1, 2006 Posted October 1, 2006 validation mod all seems to work but i getting no numbers showing up, just a none image where they should be? Quote
sfekt` Posted October 1, 2006 Author Posted October 1, 2006 validation mod thankyou so much for posting one of these, got a few questions though 1: how often does the cron need to be updated, i ask cos i haven't got a cron file called that, 2when i succesfuly enter the correct number, it says You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. and then it just stays on that page, how can this be fixed? Because on the pages you display it on, have it refresh to validate.php?p=gym or validate.php?p=docrime and it'll forward you back to the docrime.php or gym.php after it's done. Quote
spellbyte ® Posted October 2, 2006 Posted October 2, 2006 validation mod all seems to work but i getting no numbers showing up' date=' just a none image where they should be?[/quote'] you have to create an image called You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. ok sfekt, i'll do that now thanks :) Quote
sfekt` Posted October 2, 2006 Author Posted October 2, 2006 validation mod pm me if you want me to send you it, i dont wanna use b/w hosting it lol Quote
S0UL Posted October 2, 2006 Posted October 2, 2006 validation mod thanks i made one, all works a treat now. how often does it validate as i put the lines in one of the cron files but it only seems to come up once every so often very random, sometimes not for hours? Quote
veteran Posted October 20, 2006 Posted October 20, 2006 validation mod will this work for the lite version as i have done everything including the png image and the 5 digit number still wont work :no: Quote
Anaconda Posted October 21, 2006 Posted October 21, 2006 validation mod yes it works for lite u must have input the code wrong Quote
veteran Posted October 21, 2006 Posted October 21, 2006 validation mod yes it works for lite u must have input the code wrong had another go and it still don't work :hmmm: could it be something with the web-host im using Quote
Astra Posted October 21, 2006 Posted October 21, 2006 validation mod I just can't get the image too show :hmmm: does anyone have the image used? Quote
Astra Posted October 22, 2006 Posted October 22, 2006 validation mod Even with that uploaded it still does not work could it be anything else? Quote
Revolution Posted October 22, 2006 Posted October 22, 2006 validation mod Might need to enable the GD library or something like that. I've come across similar ones that needed that enabled, maybe this is the same? Also check your image is background2.png and not saved as a jpg or bmp etc... Quote
Astra Posted October 22, 2006 Posted October 22, 2006 validation mod Yes it is .png Also how would you enable the GD library? Quote
Revolution Posted October 22, 2006 Posted October 22, 2006 validation mod you would probably have to contact your host provider - or if its on your localhost edit the php.ini (always make a copy before any changes) - I would suggest looking it up on google. I was able to enable it doing that Quote
Revolution Posted October 22, 2006 Posted October 22, 2006 validation mod Have a look at this: http://uk2.php.net/gd (hopefully that is the problem - if not then I have no idea why it wont work) Anyone using that WAMP server seen on other posts can simply edit the following in the php.ini file: Find You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. remove the ; as seen below: You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. Quote
DesignLoft Posted November 25, 2006 Posted November 25, 2006 Re: validation mod Skept. this is a very nice script, but a n00b like myself does not know the "mysql code" to add the 2 tables into users, please could someone provide me with the code so i can get this script installed, thanks :roll: Quote
elessar Posted February 22, 2007 Posted February 22, 2007 Re: validation mod Some browsers have some form of meta blocking content so they can skip the validator any way to correct this Quote
Eibwen Posted April 23, 2007 Posted April 23, 2007 Re: [mccode] validation mod I get the error: Parse error: syntax error, unexpected T_ENCAPSED_AND_WHITESPACE, expecting T_STRING or T_VARIABLE or T_NUM_STRING in C:\wamp\www\monocountry\validate.php on line 62 You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. Quote
Almost Posted May 2, 2007 Posted May 2, 2007 Re: [mccode] validation mod any chance of getting this for v2 Quote
Z?v?? Posted May 4, 2007 Posted May 4, 2007 Re: [mccode] validation mod v2 comes with a validation mod. 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.