Update ip when login.

07/24/2015 00:38 banktakung#1
1.make new column and name it "ipaddress" at ACCOUNT_TBL_DETAIL


2.go to Stored Procedures --> Edit dbo.LOGIN_STR

under
PHP Code:
WHERE account = @iaccount  AND password = @ipassword) BEGIN 

insert
PHP Code:
UPDATE ACCOUNT_TBL_DETAIL SET ipaddress = @i_IPAddress WHERE account = @iaccount 

3.execute it.

done.
07/24/2015 02:16 Michi#2
I think its not really useful because you can see the IP via website.


PHP Code:
        $strLastIngameLogin = @odbc_fetch_array(@odbc_exec($odbc_connect, '
            SELECT  [remoteIP],
                    [Start_Time]
            FROM  [' 
. $_CONFIG['db_databases']['log'] . '].[dbo].[LOG_LOGIN_TBL]
            WHERE [account] = \'' 
. $mixedAccountInformationArray['account'] . '\'
            ORDER BY [Start_Time] DESC
        '
)); 
[Only registered and activated users can see links. Click Here To Register...]
07/24/2015 03:12 banktakung#3
Quote:
Originally Posted by Dude';32505330]I think its not really useful because you can see the IP via website.


[php] $strLastIngameLogin = @odbc_fetch_array(@odbc_exec($odbc_connect, '
SELECT [remoteIP],
[Start_Time]
FROM [' . $_CONFIG['db_databases
['log'] . '].[dbo].[LOG_LOGIN_TBL]
WHERE [account] = \'' . $mixedAccountInformationArray['account'] . '\'
ORDER BY [Start_Time] DESC
'));[/php]
[Only registered and activated users can see links. Click Here To Register...]

In my opinion.it made alot more easy if you developer program to check ip of user :)
07/24/2015 04:21 Michi#4
Quote:
Originally Posted by banktakung View Post
In my opinion.it made alot more easy if you developer program to check ip of user :)
Sry but your sentence doesn't make sense.
Could you explain me your sentence.

Greets
Dude
07/24/2015 09:41 alfredico#5
Quote:
Originally Posted by banktakung View Post
In my opinion.it made alot more easy if you developer program to check ip of user :)
But it's worse, you can see only the last IP of the user while on log database you can see all IP the user used and much more information.
07/26/2015 08:16 banktakung#6
example.

i'm develop gameguard. and if i want my program to auto-ban so i need to have user ip to make query update where ip bla bla bla.
07/29/2015 03:03 xTwiLightx#7
Quote:
Originally Posted by banktakung View Post
example.

i'm develop gameguard. and if i want my program to auto-ban so i need to have user ip to make query update where ip bla bla bla.
Well, you have the LOG_LOGIN_TBL which logs the ip address of every login - why should we fill SQL Server with data that is saved more than once?
07/29/2015 15:40 pakinglalat#8
IP address banning is useless if the user has a dynamic IP.
07/29/2015 15:42 Drabur#9
Quote:
Originally Posted by pakinglalat View Post
IP address banning is useless if the user has a dynamic IP.
you can use range ips
07/31/2015 19:49 banktakung#10
Quote:
Originally Posted by pakinglalat View Post
IP address banning is useless if the user has a dynamic IP.
$db->prepare("UPDATE ACCOUNT_TBL_DETAIL SET BlockTime = blablabla WHERE ipaddress = :s");
$db->BindParam(':s',$ip);

-.-!