Jump to content
MakeWebGames

Recommended Posts

Posted

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.

Posted

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?

Posted

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.

Posted

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 :)

Posted

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?

  • 3 weeks later...
Posted

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

Posted

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...

Posted

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

Posted

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.

  • 1 month later...
Posted

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:

  • 2 months later...
  • 2 months later...
Posted

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.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...