View Full Version : how to save user ip address in user from last post
mr_clean_mr
05-06-2011, 06:36 AM
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
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
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
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
vBulletin® v3.8.12 by vBS, Copyright ©2000-2025, vBulletin Solutions Inc.