Skip to forum content

You are not logged in. Please login or register.


forums.pvpgn.pro → 3d Party Tools → How to Setting Web Registration PvPGN one Ip one Id

Pages 1

You must login or register to post a reply

RSS topic feed

Posts: 16

1

Topic: How to Setting Web Registration PvPGN one Ip one Id

Help me please harpywar...
how to setting Web Registration PvPGN one ip One Id.
thanks you..

2

Re: How to Setting Web Registration PvPGN one Ip one Id

1. Add to config.inc.php new variable

$one_acct_per_ip = true;

2. Open index.php and find code block:

        if ($one_acct_per_email) {
            if (@mysql_fetch_row(@mysql_query("SELECT * FROM `pvpgn_BNET` WHERE acct_email = \"" . trim($_POST['acct_email']) . "\";",$dbh))) {
                error(0,$language['oneemailonly'],"");
            }
        }

After the found code add this:

        if ($one_acct_per_ip) {
            if (@mysql_fetch_row(@mysql_query("SELECT * FROM `pvpgn_BNET` WHERE acct_lastlogin_ip = \"" . $_SERVER['REMOTE_ADDR'] . "\";",$dbh))) {
                error(0,"","");
            }
        }

3. If you use admin activation, you need to do step 2 in activate.php

Do not ask for support in PM.

3 (edited by NightMan 23.09.2011 07:49)

Re: How to Setting Web Registration PvPGN one Ip one Id

okay thanks.
sorry I forgot, I mean one day can only make the id 1 time in 1 ip
what's the problem?

4

Re: How to Setting Web Registration PvPGN one Ip one Id

You may to create a new table in the database.
For instance `ip_match_day` with fields `day` int(2) and `ip` varchar(15).
On each attempt for account create, you should check current IP for exists in that table and compare day numbers.

Do not ask for support in PM.

5

Re: How to Setting Web Registration PvPGN one Ip one Id

HarpyWar wrote:

You may to create a new table in the database.
For instance `ip_match_day` with fields `day` int(2) and `ip` varchar(15).
On each attempt for account create, you should check current IP for exists in that table and compare day numbers.

напиши на русском языке пожжжж sad  sad

6

Re: How to Setting Web Registration PvPGN one Ip one Id

Это из разряда do it yourself. Если не знаешь PHP, перевод не поможет.

Do not ask for support in PM.

7

Re: How to Setting Web Registration PvPGN one Ip one Id

одному ID рег 5 account в 1 ден нужен мне! как эта сделается?

Добавлено: 01.11.2011 18:12

кто ни буд скажет а ?

8 (edited by kXander 03.01.2017 21:26)

Re: How to Setting Web Registration PvPGN one Ip one Id

Could you share the function to add display ip address in admin activation panel for web register? (using same default webregister0.4 http://forums.pvpgn.pro/viewtopic.php?pid=4578#p4578 )

Function should add column Ip Address in web prntscr.com/dr29yy and mysql datable  prntscr.com/dr2aby and display the address of the account who register.

9

Re: How to Setting Web Registration PvPGN one Ip one Id

kXander wrote:

Could you share the function to add display ip address in admin activation panel for web register? (using same default webregister0.4 http://forums.pvpgn.pro/viewtopic.php?pid=4578#p4578 )

Function should add column Ip Address in web prntscr.com/dr29yy and mysql datable  prntscr.com/dr2aby and display the address of the account who register.

You can see user ip in `acct_lastlogin_ip` of pvpgn table `bnet`. Is it not enough?

Do not ask for support in PM.

10 (edited by kXander 03.01.2017 22:57)

Re: How to Setting Web Registration PvPGN one Ip one Id

You can see that only if user logs in game but I want to see it before accepting account activation.

11

Re: How to Setting Web Registration PvPGN one Ip one Id

If you find a string of function name "InsertData" inside all files of the script (for example, using notepad++) you will see several results:

http://forums.pvpgn.pro/extensions/image_uploader/storage/2/thumb/p1b5ir9a8fic817nk1c8p1aq68a9.png

I suppose it should be enough to add a new line with ip address in includes/activation.php > immediately before line 43:

...
$data['webacct_ip'] = $_SERVER['REMOTE_ADDR']; // user ip
InsertData($data,"awaiting_activation"); // <--- line 43

Surely, you have to add the appropriate column with a name `webacct_ip` in your `awaiting_activation` table.

Do not ask for support in PM.

12 (edited by kXander 03.01.2017 23:29)

Re: How to Setting Web Registration PvPGN one Ip one Id

Added $data['webacct_ip'] = $_SERVER['REMOTE_ADDR']; before line 43 in includes/activation.php
Added webacct_ip column in awaiting_activation table (varchar,32) however there is nothing there, only null value prntscr.com/dr46on

13

Re: How to Setting Web Registration PvPGN one Ip one Id

Maybe you done something wrong, because it's exactly the place where a new row is inserted in that table when the first activation email is sent to a user.
I don't know, may be you don't use activation by email, but manual activation by admin. It will be another place (line 89).

Do not ask for support in PM.

14 (edited by kXander 03.01.2017 23:43)

Re: How to Setting Web Registration PvPGN one Ip one Id

Yes, you are right and I said that in first post. line 89 is correct, thanks a lot HarpyWar.
Could you help me with the last part so the result ip is displayed in admin panel? I suppose I need to edit admin.php

15

Re: How to Setting Web Registration PvPGN one Ip one Id

You can put a variable $webacct_ip somewhere in admin.php > function buildusertable() > $output

Do not ask for support in PM.

16

Re: How to Setting Web Registration PvPGN one Ip one Id

Works, thank you.

Posts: 16

Pages 1

You must login or register to post a reply

Who now at forum

Currently view post: 0 guests, 0 registered users

forums.pvpgn.pro → 3d Party Tools → How to Setting Web Registration PvPGN one Ip one Id



Generated in 0.102 seconds (84% PHP - 16% DB) with 22 queries