Cannot Register with same IP

Started on the old forum in April 2012 · view the original in the archive · old links redirect here

7 replies · 649 views · started 14 years ago · 1 min read

5 participants
sharil Junior · 44 posts #1

Hye all,

Need your assistance to provide code for cannot register with same IP. i already search in this coding-talk but couldnt find the answer. Hopefully you can assist me.

-PeaCe-

sharil Junior · 44 posts #3

ok.. and then? surely need to put some php code right?

-PeaCe-

woody Developer · 176 posts #4

you do realise this will really limit the potential number of members you have don't you?

metulj Super moderator Principal · 1,726 posts #5

woody wrote: you do realise this will really limit the potential number of members you have don't you?

I'm sure he doesnt realise that... UNIQ email and ofcourse valid one, would be better solution

It's better to keep your mouth shut and give the impression that you're stupid, than to open it and remove all doubt. ⓣⓗⓔ ⓠⓤⓘⓔⓣⓔⓡ ⓨⓞⓤ ⓑⓔ©ⓞⓜⓔ, ⓣⓗⓔ ⓜⓞⓡⓔ ⓨⓞⓤ ⓐⓡⓔ ⓐⓑⓛⓔ ⓣⓞ ⓗⓔⓐⓡ ! ιη тнєσяу, тнє ρяα¢тι¢є ιѕ α яєѕυℓт σƒ тнє тнєσяу, вυт ιη ρяα¢тι¢є ιѕ тнє σρρσѕιтє.

キノgんイノ刀g 4 ア乇ムc乇 ノ丂 レノズ乇 キucズノ刀g 4 √ノ尺gノ刀ノイリ!

sharil Junior · 44 posts #6

woody wrote: you do realise this will really limit the potential number of members you have don't you?

im realise on that. but, mostly user in my country doesn't use same ip nowdays.

-PeaCe-

metulj Super moderator Principal · 1,726 posts #7

sharil wrote: im realise on that. but, mostly user in my country doesn't use same ip nowdays.

if you got mostly mobile users, they surelly use shared IP... and even for PC users that wont be good... think about dynamic IP's... user will register with dynamic IP, then same IP will gain another user sooner or later, and it wont be able to register as IP will be already in DB...

It's better to keep your mouth shut and give the impression that you're stupid, than to open it and remove all doubt. ⓣⓗⓔ ⓠⓤⓘⓔⓣⓔⓡ ⓨⓞⓤ ⓑⓔ©ⓞⓜⓔ, ⓣⓗⓔ ⓜⓞⓡⓔ ⓨⓞⓤ ⓐⓡⓔ ⓐⓑⓛⓔ ⓣⓞ ⓗⓔⓐⓡ ! ιη тнєσяу, тнє ρяα¢тι¢є ιѕ α яєѕυℓт σƒ тнє тнєσяу, вυт ιη ρяα¢тι¢є ιѕ тнє σρρσѕιтє.

キノgんイノ刀g 4 ア乇ムc乇 ノ丂 レノズ乇 キucズノ刀g 4 √ノ尺gノ刀ノイリ!

Mysterio Lead · 630 posts #8

As the other guys said, limiting IP is not good.

Still... If you searching for code solution instead of database solution, you can do something like this in your php code:

<?php

$ip = $_SERVER['REMOTE_ADDR'];

if(mysql_num_rows(mysql_query("SELECT * FROM users WHERE ip='$ip'"))==0) {
// register script
}
else {
// ip already registered
}

?>

mysterio.al - programming is a functional art

Sign in to reply.

Similar topics

Keyboard shortcuts

g f
Go to forums
g h
Go to your feed
g m
Go to messages
r
Reply (in a topic)
/
Search
j
Next post
k
Previous post
?
This list
Ctrl/⌘ + Enter
Send what you are writing
Ctrl/⌘ + B / I
Bold / italic while writing
Esc
Close