Ok, I am using CodeIgniter as my MVC for a project I am working on with a couple buddies of mine. We are also using CI's Database Session support. With that I do know there are "Who's online" concepts already in existence but none of them really apply to our needs per say. The service we are rolling out is a stand alone SaaS like system however at the same time we are allowing our users to communicate with one another as well. With that we let them share with who they wish specifically information like who's online when, where, etc.. So that said I know CI's sessions catch the IP, as do we when a user logs in.
So what I am wondering is, is it a plausible idea to think I can exploit the session data for what it is, to compare the ips in the session DB against those logged in to in a sense build up my own little "Who's online" specific to people who are "friendly" with one another through our service. If it is a good and potential idea, what would any of you suggest as a means of tackling it and handling it for this type of display? I only ask cause I am not 100% how the sessions via CI work so I am not sure if its going to work in my favor like I am currently imagining.
If my imagination is however running away with me, what would be a good way to tackle this otherwise?
EDIT After logging in on 2 computers I see that the CI session in the DB has 2 with the same IP so my initial thought patter seems to be flawed.
Also thanks for the Down vote, whoever you are, you could have at the least said why in a comment, I am seriously curious to know how to achieve this idea, but I can't get feedback on it? If you know of an article or post here that can help me out then at least point me towards that, cause my searches yield nothing relevant to what Im trying to explain here.