Help /Advice Requested.

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
Stormfront
Forum Newbie
Posts: 1
Joined: Tue Jul 09, 2002 11:00 pm

Help /Advice Requested.

Post by Stormfront »

After some ideas to solve the following.

A game based around php/mysql.

Users create an account that allows them to play the game, however creating multiple accounts gives them an unfair advantage over other players (one account can be used as a 'bank' for the other etc)

So what i need is a reliable way of restricting accounts to one per computer.

I have tried using cookies, but the more astute users modify or delete the cookies between creating accounts so that was only partially successful.

I have tried requiring email validation, the account must be validated with a code sent to an email address, hotmail.com etc makes it fairly easy for people to create multiple email address so again only partially successful.

What im after is some sort of unique identifier for a particular computer / user that i can store in the user table, i can then compare new accounts to this existing value and if i get a match reply with something like...

"Our records show an account allready registered to this computer, game rules allow only 1 account per player, please delete your existing account to continiue"

So are their any such unique identifiers ? any ideas at all greatly appreciated.
User avatar
cheatboy00
Forum Contributor
Posts: 151
Joined: Sat Jun 29, 2002 10:36 am
Location: canada
Contact:

Post by cheatboy00 »

well a great way is to get their ip address and if their ip addres matches one already in the database then disallow the membership....

to get a persons ip just do this.....

Code: Select all

$ip = getenv('REMOTE_ADDR');
you can change the $ ip if you want.... but hopefully you get it, just make a new colum in the table call is ip or soemthign and inscert that ip address into the row when the person signs up.... just make an if to check if a persons ip matches an ip address in the db....

now if you know about cookies maybe you can help me, my problem, its titled "calling all cookie problem's that is"
User avatar
protokol
Forum Contributor
Posts: 353
Joined: Fri Jun 21, 2002 7:00 pm
Location: Cleveland, OH
Contact:

Post by protokol »

Use a combination of cookies and an IP check.

So $_SERVER['REMOTE_ADDR'] would return the user's IP address who is attempting to access your script. Use the setcookie() and getcookie() functions to work with cookies.
User avatar
cheatboy00
Forum Contributor
Posts: 151
Joined: Sat Jun 29, 2002 10:36 am
Location: canada
Contact:

Post by cheatboy00 »

protokol could oyu hlep me with my cookie problem its on the calling all cookie problems that is....
User avatar
protokol
Forum Contributor
Posts: 353
Joined: Fri Jun 21, 2002 7:00 pm
Location: Cleveland, OH
Contact:

Post by protokol »

You need to be much more specific about what problems you are having when reading the cookies. Then many more people and I will be more than happy to help out.
User avatar
mikeq
Forum Regular
Posts: 512
Joined: Fri May 03, 2002 3:33 am
Location: Edinburgh, Scotland

Post by mikeq »

cheatboy00 wrote:well a great way is to get their ip address and if their ip addres matches one already in the database then disallow the membership....
This is not a good way to do it, most users on the net do not have static IP addresses (i.e. it is re-assigned the next time they dial up), also if people come through a company firewall you could have an entire workforce appearing to have the same IP to the outside world.

Mike
Post Reply