2011-05-10, 03:11 AM
Is it possible to get a user's last post IP via code?
Getting the user's last post IP...
|
2011-05-10, 03:11 AM
Is it possible to get a user's last post IP via code?
2011-05-10, 03:24 AM
You've made similar thread before: http://community.mybb.com/thread-84074.html
If you want to get the User's IP in post then you can use this variable;
(2011-05-10, 03:24 AM)Yaldaram Wrote: You've made similar thread before: http://community.mybb.com/thread-84074.htmlHow exactly does the variable contain a certain users last IP? Currently, my script only gets the user's last login IP by running a query...
2011-05-10, 03:56 AM
Where exactly you want to show the User's IP ? In post or any where else ?
2011-05-10, 07:27 AM
You can get the IP address from where a user has last posted with this code:
Of course you need to change the uid (now = 1) in the query to make it more dynamic. But you already have the users last ip, so I guess you know how to do that.
2011-05-10, 01:53 PM
This is what my script currently does:
1. Get the Users current IP. $_SERVER['REMOTE_ADDR']; 2. Run a DB Query getting a user's info. $query = $db->query("SELECT username,postnum,usergroup,additionalgroups,lastip FROM mybb_users WHERE lastip='$ip'"); 3. echo the info. Currently, step 2 gets the users information based on their last login IP, I want it to get the information based on their last post IP. That way, the script only gets the information of active posting uesrs.
2011-05-10, 02:03 PM
(This post was last modified: 2011-05-10, 02:04 PM by Aries-Belgium.)
Then try this:
Edit: replaced php with code tags to prevent the content from being stretched. |
« Next Oldest | Next Newest »
|