vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB4 Programming Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=252)
-   -   how to save user ip address in user from last post (https://vborg.vbsupport.ru/showthread.php?t=263241)

mr_clean_mr 05-06-2011 06:36 AM

how to save user ip address in user from last post
 
how would i go about saving the last ip the user posted with in the vb database to the "USER" section of the database

currently the ip address for users in the USER database is only the ip they registered with. i would like this ip to be changed to the last post they made

any help would be great! thanks! :)

Disasterpiece 05-07-2011 12:13 AM

If I'm not mistaken, the IP gets saved with every post in the post table. Check this out, you might also want to check the vB settings, you need to enable the ip-per-post-saving functionality first.

mr_clean_mr 05-07-2011 08:57 AM

Quote:

Originally Posted by Disasterpiece (Post 2192822)
If I'm not mistaken, the IP gets saved with every post in the post table. Check this out, you might also want to check the vB settings, you need to enable the ip-per-post-saving functionality first.

this is true but the problem is i have a php script pulling the username according to ip and allowing a program to be used

so say if username "John" with ip 123.123.123.123 posted from computer 1

now john goes to computer 2 and posts with ip 444.444.444.444

now john can use that program from both computers

i want john to only be allowed to use the program on the computer with the most current ip in the system.... now in the user database there is only 1 username with John so he will only have 1 ip in there that way computer 2 wont be able to run that program anymore and vis versa

Yellow Slider 05-07-2011 10:36 AM

You can just pull it from the post table.
SELECT ipaddress FROM post WHERE userid = X ORDER BY dateline DESC LIMIT 1

mr_clean_mr 05-07-2011 07:58 PM

Quote:

Originally Posted by Yellow Slider (Post 2192943)
You can just pull it from the post table.
SELECT ipaddress FROM post WHERE userid = X ORDER BY dateline DESC LIMIT 1

but im trying to recieve username from ip address

so this is why im having problems...

mr_clean_mr 05-10-2011 06:21 AM

anyone help me with this

to recap i just want to save the ip from the user when they make a post (new thread or reply) to there user profile when you go to admincp

Lynne 05-10-2011 04:33 PM

Wow. I'd never be able to post on your site. I have a dynamic IP and can't do anything about that. If you looked up my IPs on here or vb.com, it would be a long, long list. Are you really sure you want to do this?

mr_clean_mr 05-10-2011 10:46 PM

Quote:

Originally Posted by Lynne (Post 2194098)
Wow. I'd never be able to post on your site. I have a dynamic IP and can't do anything about that. If you looked up my IPs on here or vb.com, it would be a long, long list. Are you really sure you want to do this?

yes. mostly for purposes of tacking the persons last ip. so just everytime they post it puts there current ip in their admincp profile

please help someone! :)

mr_clean_mr 05-13-2011 06:44 AM

anyone? ill paypal someone $5 if they can figure this out for me

pretty much i just want the ip from the users most recent post/thead/reply to be logged in the profile when accessing admincp

so there ip should record to the "user" part of the database


All times are GMT. The time now is 01:07 AM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01143 seconds
  • Memory Usage 1,725KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (3)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (9)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete