Jump to content

Archived

This topic is now archived and is closed to further replies.

pluginbaby

user IP

Recommended Posts

It works perfectly, only, my brother his pc and my pc are on the same network (wireless)and with him the IP shows the same as on my pc.

Is there something that is different for every pc?
And how can I get that?

I want a unique value for every pc ;)

Share this post


Link to post
Share on other sites
what is it that tyou are trying to limit? you may be able to use sessions..

Share this post


Link to post
Share on other sites
[code]<?php

$ip=$_SERVER['REMOTE_ADDR'];

// insert in db

// select from db all players with that id

// if there is more then 1 players with the same IP => set multi status +1

if (empty($_COOKIE['cookie_user'])) {

setcookie("cookie_user","$username",Time()+604800);
}

if ($_COOKIE['cookie_user'] != $username) {

//update multi status: +1

}

// if multi status = 6, send admin a message with the user beeing spotted for multiing

?>[/code]

I came up with a basic idea, does this look good?

Share this post


Link to post
Share on other sites
You can not rely on IP to determin wether a person (or more specificly a pc) has multiple accounts. Some people share their IP, some have dynamic IP's, it simply won't do. Cookies aren't relyable either. It's just a plain file, I (the user) can adjust it as I see fit. Your best option is to bind the users' MAC adress, as it doesn't change (often).

I recently ran into [url=http://forums.devarticles.com/general-programming-help-4/how-can-i-find-out-the-user-mac-address-1846.html]this[/url] thread on DevShed that'll give you an insight.

Share this post


Link to post
Share on other sites

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.