Jump to content
MakeWebGames

Recommended Posts

Posted

Okay first replace your register.php with:

 

You're unable to view this code.

Viewing code within this forum requires registration, you can register here for free.

 

Then name this one activation_cron.php

 

You're unable to view this code.

Viewing code within this forum requires registration, you can register here for free.

 

Then add this to you SQL:

[mysql]CREATE TABLE `confirm` (

`user` INT( 11 ) NOT NULL ,

`code` BIGINT( 40 ) NOT NULL

) ENGINE = MYISAM ;

 

ALTER TABLE users ADD `confirmed` int(11) NOT NULL ;

UPDATE users SET confirmed=1[/mysql]

Then last but not least, add this to your cron jobs as a two hour cron:

0 */2 * * * * curl http://yourgameurl.com/activation_cron.php?code=713518314

Posted

Fixed errors, unless your on php 5.3.1 (ties in with next part ;))

and still insecure

$IP = ($_SERVER['HTTP_X_FORWARDED_FOR'])

? $_SERVER['HTTP_X_FORWARDED_FOR']

:$_SERVER['REMOTE_ADDR'];

Posted

ereg() eregi() are deprecated now (and I think removed as of PHP 6.0)

preg_match()

preg_replace()

Are your better options :)

EDIT: Didn't see RulerOfZu's post O.o

Posted

How hard can it be to replace the whole of

$IP = ($_SERVER['HTTP_X_FORWARDED_FOR'])

? $_SERVER['HTTP_X_FORWARDED_FOR']

:$_SERVER['REMOTE_ADDR'];

with $IP = $_SERVER['REMOTE_ADDR'];

Posted
How hard can it be to replace the whole of

$IP = ($_SERVER['HTTP_X_FORWARDED_FOR'])

? $_SERVER['HTTP_X_FORWARDED_FOR']

:$_SERVER['REMOTE_ADDR'];

with $IP = $_SERVER['REMOTE_ADDR'];

Oh I get it now! ;) Sorry

Posted

The whole email check function was posted on a linux forum back in 2007

May interest you to find that it was updated to the following. Not tested it though.

 

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