Register for your free account! | Forgot your password?

Go Back   elitepvpers > MMORPGs > Shaiya > Shaiya Private Server
You last visited: Today at 20:53

  • Please register to post and access all features, it's quick, easy and FREE!

Advertisement



Limiting registration based on IP.

Discussion on Limiting registration based on IP. within the Shaiya Private Server forum part of the Shaiya category.

Reply
 
Old   #1
 
[Dev]RiseAgainst's Avatar
 
elite*gold: 0
Join Date: Jun 2011
Posts: 54
Received Thanks: 13
Limiting registration based on IP.

The title says it all. I would like to know how in the registration script do i make it so that you cant register more then once on the same ip address/ computer.
[Dev]RiseAgainst is offline  
Old 09/20/2011, 22:24   #2
 
[GM]Hazel's Avatar
 
elite*gold: 0
Join Date: Sep 2010
Posts: 20
Received Thanks: 2
lol i would like to know myself
[GM]Hazel is offline  
Thanks
1 User
Old 09/20/2011, 22:38   #3
 
JohnHeatz's Avatar
 
elite*gold: 150
Join Date: Apr 2010
Posts: 9,739
Received Thanks: 8,981
I'm not an "expert" on PhP, but the basics of it would be to simply check the IP that is being used while registering with every UserIP registered on the Database, so, (again this won't be PhP based, not even really for any specific language, just something for you to get the idea) there would need to be something like this:

Code:
Function Search ([COLOR="SeaGreen"]Send the IP you receive from the registering User[/COLOR])
        [COLOR="DeepSkyBlue"]counter[/COLOR] = [COLOR="Red"]0[/COLOR]
        Try
            connect_to_database[[COLOR="SeaGreen"]PS_UserData[/COLOR]]
            Select * from dbo.Users_Master where UserIp = [COLOR="Red"]Sent_IP[/COLOR] 
            DataAdapter.SelectCommand = [[COLOR="SeaGreen"]query_from_above[/COLOR]]
            DataSet.Clear()
            Conection.Open()
            DataAdapter.Fill(DataSet, "dbo.Users_Master")
            Conection.Close()

            If oDataAdapter.Fill(DataSet) > 0 Then
                [COLOR="DeepSkyBlue"]counter[/COLOR] = [COLOR="Red"]1[/COLOR]
            End If
            Return [COLOR="DeepSkyBlue"]counter[/COLOR]
        Catch ex As Exception
        End Try
    End Function
I know it looks weird, I tried to make it simple, but this is what I got. What you are doing here is:

1- Starting a function which will receive the IP of the user who is registering an account (up to you on how you will get it)
2- You start a variable (boolean -Yes,No-) counter which is the one who will tell you if you found the IP already on your database.
3- You use a SQL Query to compare that IP from the registering user against the IPs that are stored on your PS_UserData.dbo.Users_Master to try and find a match between them
4- Then you are storing the information you got from it (as boolean) to know if there was or not a match
5- You send back that information, then you will have to code what you are going to show if the IP had a match on your database (The user had already registered an account under that IP) and/or just let that registration go smoothly

Again, this might look weird, but that is where I would start if I had to do something like this; I am sure that there could be many other ways of doing this, and If i knew PhP properly I would've posted it, but unfortunately I don't know much about PhP
JohnHeatz is offline  
Thanks
5 Users
Old 09/20/2011, 22:42   #4
 
[Dev]RiseAgainst's Avatar
 
elite*gold: 0
Join Date: Jun 2011
Posts: 54
Received Thanks: 13
Quote:
Originally Posted by JohnHeatz View Post
I'm not an "expert" on PhP, but the basics of it would be to simply check the IP that is being used while registering with every UserIP registered on the Database, so, (again this won't be PhP based, not even really for any specific language, just something for you to get the idea) there would need to be something like this:

Code:
Function Search ([COLOR="SeaGreen"]Send the IP you receive from the registering User[/COLOR])
        [COLOR="DeepSkyBlue"]counter[/COLOR] = [COLOR="Red"]0[/COLOR]
        Try
            connect_to_database[[COLOR="SeaGreen"]PS_UserData[/COLOR]]
            Select * from dbo.Users_Master where UserIp = [COLOR="Red"]Sent_IP[/COLOR] 
            DataAdapter.SelectCommand = [[COLOR="SeaGreen"]query_from_above[/COLOR]]
            DataSet.Clear()
            Conection.Open()
            DataAdapter.Fill(DataSet, "dbo.Users_Master")
            Conection.Close()

            If oDataAdapter.Fill(DataSet) > 0 Then
                [COLOR="DeepSkyBlue"]counter[/COLOR] = [COLOR="Red"]1[/COLOR]
            End If
            Return [COLOR="DeepSkyBlue"]counter[/COLOR]
        Catch ex As Exception
        End Try
    End Function
I know it looks weird, I tried to make it simple, but this is what I got. What you are doing here is:

1- Starting a function which will receive the IP of the user who is registering an account (up to you on how you will get it)
2- You start a variable (boolean -Yes,No-) counter which is the one who will tell you if you found the IP already on your database.
3- You use a SQL Query to compare that IP from the registering user against the IPs that are stored on your PS_UserData.dbo.Users_Master to try and find a match between them
4- Then you are storing the information you got from it (as boolean) to know if there was or not a match
5- You send back that information, then you will have to code what you are going to show if the IP had a match on your database (The user had already registered an account under that IP) and/or just let that registration go smoothly

Again, this might look weird, but that is where I would start if I had to do something like this; I am sure that there could be many other ways of doing this, and If i knew PhP properly I would've posted it, but unfortunately I don't know much about PhP
Ill try this out. And even if you dont know much ty for the attempt. Its greatly appreciated.
[Dev]RiseAgainst is offline  
Old 09/20/2011, 22:49   #5
 
JohnHeatz's Avatar
 
elite*gold: 150
Join Date: Apr 2010
Posts: 9,739
Received Thanks: 8,981
That is a modified function I use while codeing on other languages (basically) what I did there was to simplify it, at least, by having that information you should be able to get the idea on what you need to do when you get it to PhP, because I use it on other languages when I have to do some "checking" for this kind of information to allow/forbid the income/outcome of information
JohnHeatz is offline  
Old 09/20/2011, 22:55   #6
 
elite*gold: 0
Join Date: Jun 2011
Posts: 108
Received Thanks: 269
must go inside the executing procedure tied into the account regestration page..

$ip = $_SERVER['REMOTE_ADDR']; // added attop with other defining info grabs the ip they useto fill out the regestration form

// check tosee if ip used to fill out form is regestered already thre the users details tabel. if so ends all execution and doenot creat the account
$ipcheck = @mssql_query("SELECT * FROM PS_UserData.dbo.Users_Detail WHERE RegesterdIP=('".$ip."')");

if(@mssql_num_rows($ipcheck) > 0){
die("The registering IP has already been used");
}else{



// how i use the regestration tostoredregesterd ips and est of my info i requier apone regestration

$query3 = mssql_query("INSERT INTO PS_UserData.dbo.Users_Detail (UserID,RealName,PwQuestion,PwAnswer,Email,Gender, JoinDate,RegesterdIP) VALUES ('".$userid."','".$realname."','".$passq."','".$pa ssa."','".$email."','".$gender."','".$date."','".$ ip."')");

you may need to change some info in the last section to have store in user details as mine is compleatly redone and new /deleated colums in my table.



if already have regesterd accounts without the ip being stored inside the details tabel can try

$ipcheck = @mssql_query("SELECT * FROM PS_UserData.dbo.Users_Master WHERE UserIp=('".$ip."')");

if(@mssql_num_rows($ipcheck) > 0){
die("The registering IP has already been used");
}else{


that one asuming your db stores ips on login to game will tke any loged in account from the ip that i atempting to regester asumming it has been ued to log ingame and stop th regestration proces...

the only downfall i have foun to this is

1: same comp brother/sister /mom/dad/cusins and all the rest liveing in 1 home with 1 comp will be forced to share1singel account..

2: if get the funy glitch like i do and stores 1 ip for multiple accounts loging ingame from same modemyet difrent ips/comps wil cause yet another singel account abel to regester in the household
[DEV]xXDASHXx is offline  
Old 09/25/2011, 01:15   #7
 
-III-'s Avatar
 
elite*gold: 0
Join Date: Mar 2011
Posts: 212
Received Thanks: 264
I have released a method I use, primarily put together by Abrasive.

You can find it by
-III- is offline  
Thanks
1 User
Reply


Similar Threads Similar Threads
Limiting
05/20/2011 - EO PServer Hosting - 7 Replies
is there a way to limit the use of a items like exp ball max times used in a day is like 3 exp balls on them selfs?
[HowTo]Limiting closed Response Fehler
09/10/2010 - Metin2 PServer Guides & Strategies - 5 Replies
Hallo Com. gleich vorweg is mein erstest Tut. Also nun zum Tut: Ich hatte erst das problem bei meinem server das wenn er gestartet ist nachner zeit kommt Limiting icmp unreach response from 417 to 200 packets per second
[Guide] Limiting What Your Staff Can Do in Db
04/11/2010 - EO PServer Guides & Releases - 3 Replies
hey again this would be my 2nd guide. in this guide we will learn how to limit the stuff ur staff can see or update in ur DB. Note: you must trust someone be fore allowing them in your db even if its limited first make the person a account in navicat http://img24.imageshack.us/img24/3241/76612321.pn g select the name and do not press select all. open open my or account db and scroll down to the db you want them to access. check the boxes that u want. after that click save after each...
[RELEASE] I named my bot LILPROHACKER, based "Disconnect'S packet based BOT"
02/08/2010 - Shaiya Hacks, Bots, Cheats & Exploits - 6 Replies
Hello guys Thats release section right??? http://img686.imageshack.us/img686/8051/fuckthate .jpg Shaiya Packet Bot By lilprohacker - G-R - Your Gaming Community DLL error, but its not my problem i did it just for show people what is dll error. Solution: Put "pipeClient.dll" and "packet.dll" to Shaiya Packet Bot v1023 folder http://img707.imageshack.us/img707/4519/fuckthat. jpg



All times are GMT +1. The time now is 20:53.


Powered by vBulletin®
Copyright ©2000 - 2026, Jelsoft Enterprises Ltd.
SEO by vBSEO ©2011, Crawlability, Inc.
This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

Support | Contact Us | FAQ | Advertising | Privacy Policy | Terms of Service | Abuse
Copyright ©2026 elitepvpers All Rights Reserved.