Cannot Register with same IP
Started on the old forum in April 2012 · view the original in the archive · old links redirect here
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ノ刀ノイリ!
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-
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ノ刀ノイリ!
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