Author Topic: Register to IP  (Read 8578 times)

0 Members and 1 Guest are viewing this topic.

Offline DjeckMcNil

  • Jr. Member
  • **
  • Posts: 55
    • View Profile
Register to IP
« on: July 09, 2005, 10:42:16 AM »
I am sorry for my English. The question interests such here. Whether it is possible to make so that the user was registered on IP, that is at call was checked IP the user and anybody could not take advantage of its account any more.

Интересует такой вот вопрос. Можно ли сделать так, чтобы пользователь регистрировался по IP, то есть при заходе проверялся IP пользователя и никто больше не мог воспользоваться его аккаунтом.

P.S. Уважаемый V@NO, я так понимаю, русским вы владеете. Я плохо дружу с английским. Поэтому не могли бы вы помочь с данным вопросом. Заранее огромное спасибо!!!

Offline V@no

  • If you don't tell me what to do, I won't tell you where you should go :)
  • Global Moderator
  • 4images Guru
  • *****
  • Posts: 17.849
  • mmm PHP...
    • View Profile
    • 4images MODs Demo
Re: Register to IP
« Reply #1 on: July 09, 2005, 05:01:03 PM »
1) 4images ne zapominaet IP posetitelej, IP tol'ko vremmeno privyazyvaetsya k session, poka ona aktivna.
2) ochen' mnogo ludej sidyat na dinamicheskom IP, kotoryj izmenyaetsya pri zahode v internet, u nekotoryh IP mozhet izmenyatsya pri kazhdom zaprose stranicy...tak chto eta ideya ne budet rabotat' na 100%
Your first three "must do" before you ask a question:
Please do not PM me asking for help unless you've been specifically asked to do so. Such PMs will be deleted without answer. (forum rule #6)
Extension for Firefox/Thunderbird: Master Password+    Back/Forward History Tweaks (restartless)    Cookies Manager+    Fit Images (restartless for Thunderbird)

Offline DjeckMcNil

  • Jr. Member
  • **
  • Posts: 55
    • View Profile
Re: Register to IP
« Reply #2 on: July 09, 2005, 06:20:31 PM »
1) 4images ne zapominaet IP posetitelej, IP tol'ko vremmeno privyazyvaetsya k session, poka ona aktivna.
2) ochen' mnogo ludej sidyat na dinamicheskom IP, kotoryj izmenyaetsya pri zahode v internet, u nekotoryh IP mozhet izmenyatsya pri kazhdom zaprose stranicy...tak chto eta ideya ne budet rabotat' na 100%

At me just a local network, where addresses at all static. The way to fix one user on one account that anybody more this account, except for the concrete user could not take advantage is necessary.

У меня как раз локальная сеть, где адреса у всех статические. Нужен способ зафиксировать одного пользователя на одном аккаунте, чтобы никто больше этим аккаунтом, кроме конкретного пользователя не смог воспользоваться.

Offline V@no

  • If you don't tell me what to do, I won't tell you where you should go :)
  • Global Moderator
  • 4images Guru
  • *****
  • Posts: 17.849
  • mmm PHP...
    • View Profile
    • 4images MODs Demo
Re: Register to IP
« Reply #3 on: July 09, 2005, 06:57:34 PM »
ya ne proveryal:

1) dobav' novyj "field" (user_ip) v 4images_users tablicu  (blin, po-russki ne znayu kak eto vse nazyvaetsya :?)
2) v includes/db_field_definitions.php dobav':
Code: [Select]
$additional_user_fields['user_ip'] = array("User IP", "text", 0);3) v includes/sessions.php izmeni:
Code: [Select]
              WHERE ".get_user_table_field("u.", "user_id")." = $user_id AND l.user_id = ".get_user_table_field("u.", "user_id");na:
Code: [Select]
              WHERE ".get_user_table_field("u.", "user_id")." = $user_id AND l.user_id = ".get_user_table_field("u.", "user_id")." AND u.user_ip = '".$this->user_ip."'";
izmeni:
Code: [Select]
                WHERE ".get_user_table_field("", "user_id")." = $user_id"; na:
Code: [Select]
                WHERE ".get_user_table_field("", "user_id")." = $user_id AND user_ip = '".$this->user_ip."'";
Tepere' dobav' IP dlya kazhdogo uzhe sushestvueshego usera cherez "Edit user" v ACP.

4) dlya togo chtoby IP avtomaticheski dobavlyalsya pri registracii novogo usera najdi v register.php:
Code: [Select]
    $additional_value_sql = "";i dobav' nizhe:
Code: [Select]
    $HTTP_POST_VARS['user_ip'] = $site_sess->user_ip;
P.S. vse eto ne testirovano, i bylo napisano pryamo v browsere, tak-chto vozmozhny oshibki.
Your first three "must do" before you ask a question:
Please do not PM me asking for help unless you've been specifically asked to do so. Such PMs will be deleted without answer. (forum rule #6)
Extension for Firefox/Thunderbird: Master Password+    Back/Forward History Tweaks (restartless)    Cookies Manager+    Fit Images (restartless for Thunderbird)

Offline DjeckMcNil

  • Jr. Member
  • **
  • Posts: 55
    • View Profile
Re: Register to IP
« Reply #4 on: July 09, 2005, 07:43:52 PM »
Here the first mistake; After all above-stated actions it is impossible to come under the administrator. Inscription Control Panel below vanishes. And here on a course a question. In mySQL new field with what parameters to create it is necessary (I have in view of: the FIELD, TYPE, LENGTHS of VALUE, COMPARISON, ATTRIBUTES, the ZERO...)? Can where that that that in mySQL to register it is necessary... Specify please. Thanks.


Вот первая ошибка; После всех вышеприведенных действий нельзя зайти под админом. Внизу пропадает надпись Control Panel.
И вот еще по ходу вопрос. В mySQL новый field с какими показателями создавать надо (имею ввиду: ПОЛЕ, ТИП, ДЛИНЫ ЗНАЧЕНИЯ, СРАВНЕНИЕ, АТРИБУТЫ, НОЛЬ...)? Может где то что то в mySQL прописывать надо... Уточните пожалуйста. Спасибо.

Offline V@no

  • If you don't tell me what to do, I won't tell you where you should go :)
  • Global Moderator
  • 4images Guru
  • *****
  • Posts: 17.849
  • mmm PHP...
    • View Profile
    • 4images MODs Demo
Re: Register to IP
« Reply #5 on: July 09, 2005, 08:21:32 PM »
type: varchar(15)

potom nuzhno vruchnuyu vstavit' IP dlya administratora, napryamuyu v MySQL (naprimer cherez phpmyadmin).
Eto mozhno sdelat' chere etu query:
Code: [Select]
UPDATE 4images_users SET user_ip = '<ip>' WHERE user_id = <userid>Izmeni <userid> na user id, i <ip> na IP kotoryj ty hochesh ustanovit' dlya etogo usera.
Dlya nachala sdelaj eto tol'ko dlya svoego administratora.
Your first three "must do" before you ask a question:
Please do not PM me asking for help unless you've been specifically asked to do so. Such PMs will be deleted without answer. (forum rule #6)
Extension for Firefox/Thunderbird: Master Password+    Back/Forward History Tweaks (restartless)    Cookies Manager+    Fit Images (restartless for Thunderbird)

Offline DjeckMcNil

  • Jr. Member
  • **
  • Posts: 55
    • View Profile
Re: Register to IP
« Reply #6 on: July 09, 2005, 09:04:33 PM »
All has turned out. The unique moment. In the administrator of panel IP appears only after the first call of the user, and primarily IP it is necessary to correct in mySQL after registration of the user. Many thanks to you for the help!!!

Все получилось. Единственный момент. В админ панели IP появляется только после первого захода пользователя, а первично IP надо править в mySQL после регистрации пользователя. Огромное спасибо вам за помощь!!!

Offline V@no

  • If you don't tell me what to do, I won't tell you where you should go :)
  • Global Moderator
  • 4images Guru
  • *****
  • Posts: 17.849
  • mmm PHP...
    • View Profile
    • 4images MODs Demo
Re: Register to IP
« Reply #7 on: July 09, 2005, 09:19:41 PM »
В админ панели IP появляется только после первого захода пользователя, а первично IP надо править в mySQL после регистрации пользователя.
da, pochti vse verno, krome togo chto, chto IP mozhno dobavit' cherez "Edit users" v ACP ;)
Your first three "must do" before you ask a question:
Please do not PM me asking for help unless you've been specifically asked to do so. Such PMs will be deleted without answer. (forum rule #6)
Extension for Firefox/Thunderbird: Master Password+    Back/Forward History Tweaks (restartless)    Cookies Manager+    Fit Images (restartless for Thunderbird)

Offline DjeckMcNil

  • Jr. Member
  • **
  • Posts: 55
    • View Profile
Re: Register to IP
« Reply #8 on: July 09, 2005, 09:34:44 PM »
Хм... странно... Но в админ центре я что-то не увидел, где править IP. Там у меня даже нет такого пункта... Може я что-то где упустил. Хотя делал все по вашей инструкции.

Offline V@no

  • If you don't tell me what to do, I won't tell you where you should go :)
  • Global Moderator
  • 4images Guru
  • *****
  • Posts: 17.849
  • mmm PHP...
    • View Profile
    • 4images MODs Demo
Re: Register to IP
« Reply #9 on: July 09, 2005, 09:46:23 PM »
znachit chto-to ne to s db_field_definitions.php
vse novye field'y v db_field_definitions.php dolzhny avtomaticheski byt' pokazany v "Edit users"
Your first three "must do" before you ask a question:
Please do not PM me asking for help unless you've been specifically asked to do so. Such PMs will be deleted without answer. (forum rule #6)
Extension for Firefox/Thunderbird: Master Password+    Back/Forward History Tweaks (restartless)    Cookies Manager+    Fit Images (restartless for Thunderbird)

Offline impss

  • Sr. Member
  • ****
  • Posts: 382
    • View Profile
    • Cusstom.net
Re: Register to IP
« Reply #10 on: December 27, 2006, 05:53:42 AM »
Does this Record Ip address? Does it work?

and is there a english translation?