Go Back   vb.org Archive > vBulletin 4 Discussion > vB4 Programming Discussions
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools Display Modes
  #1  
Old 05-06-2011, 06:36 AM
mr_clean_mr mr_clean_mr is offline
 
Join Date: May 2011
Posts: 22
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default 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!
Reply With Quote
  #2  
Old 05-07-2011, 12:13 AM
Disasterpiece's Avatar
Disasterpiece Disasterpiece is offline
 
Join Date: Apr 2007
Location: GER
Posts: 765
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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.
Reply With Quote
  #3  
Old 05-07-2011, 08:57 AM
mr_clean_mr mr_clean_mr is offline
 
Join Date: May 2011
Posts: 22
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Disasterpiece View Post
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
Reply With Quote
  #4  
Old 05-07-2011, 10:36 AM
Yellow Slider Yellow Slider is offline
 
Join Date: Aug 2006
Posts: 249
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

You can just pull it from the post table.
SELECT ipaddress FROM post WHERE userid = X ORDER BY dateline DESC LIMIT 1
Reply With Quote
  #5  
Old 05-07-2011, 07:58 PM
mr_clean_mr mr_clean_mr is offline
 
Join Date: May 2011
Posts: 22
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Yellow Slider View Post
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...
Reply With Quote
  #6  
Old 05-10-2011, 06:21 AM
mr_clean_mr mr_clean_mr is offline
 
Join Date: May 2011
Posts: 22
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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
Reply With Quote
  #7  
Old 05-10-2011, 04:33 PM
Lynne's Avatar
Lynne Lynne is offline
 
Join Date: Sep 2004
Location: California/Idaho
Posts: 41,180
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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?
Reply With Quote
  #8  
Old 05-10-2011, 10:46 PM
mr_clean_mr mr_clean_mr is offline
 
Join Date: May 2011
Posts: 22
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Lynne View Post
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!
Reply With Quote
  #9  
Old 05-13-2011, 06:44 AM
mr_clean_mr mr_clean_mr is offline
 
Join Date: May 2011
Posts: 22
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 07:59 PM.


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.04424 seconds
  • Memory Usage 2,235KB
  • Queries Executed 11 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (1)ad_showthread_firstpost
  • (1)ad_showthread_firstpost_sig
  • (1)ad_showthread_firstpost_start
  • (3)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (9)post_thanks_box
  • (9)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (9)post_thanks_postbit_info
  • (9)postbit
  • (9)postbit_onlinestatus
  • (9)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.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/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.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
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete