IT Community - Software Programming, Web Development and Technical Support

Track User information

This is a discussion on Track User information within the PHP Programming forums, part of the Web Development category; Hi Guys, I want to track the user's login and logout time by storing values into DB for showing ...


Go Back   IT Community - Software Programming, Web Development and Technical Support > Web Development > PHP Programming

Register FAQ Members List Calendar Mark Forums Read
  #1 (permalink)  
Old 08-02-2007, 11:48 PM
Jeyaseelansarc Jeyaseelansarc is offline
D-Web Genius
 
Join Date: Mar 2007
Location: Chennai
Posts: 1,162
Jeyaseelansarc is on a distinguished road
Send a message via AIM to Jeyaseelansarc
Default Track User information

Hi Guys,
I want to track the user's login and logout time by storing values into DB for showing the user status. While clicking signout properly, then no problems for me to track. When the window is closed due to various reasons, is there any chance to track in either Javascript or PHP? and while changing the url other than my sites also get tracking.

This will help me to complete my tasks
__________________
With,
J. Jeyaseelan

Everything Possible
Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Sponsored Links
  #2 (permalink)  
Old 08-03-2007, 12:26 AM
Jeyaseelansarc Jeyaseelansarc is offline
D-Web Genius
 
Join Date: Mar 2007
Location: Chennai
Posts: 1,162
Jeyaseelansarc is on a distinguished road
Send a message via AIM to Jeyaseelansarc
Default Re: Track User information

Hi guys,
I have forgotton to mention one more things regards tracking user information.

is there any possibilities to track from the server configuration? i mean the sessions information are stored into the web server. is there any chance to track the session id which not properly closed by the user?
__________________
With,
J. Jeyaseelan

Everything Possible
Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 08-03-2007, 12:31 AM
kathir kathir is offline
D-Web Trainee
 
Join Date: Feb 2007
Posts: 25
kathir is on a distinguished road
Thumbs up Re: Track User information

Hi Jeyaseelansarc

You are tracking the user login and logout on your tracking system thats fine. My suggestion is update the member’s last transaction time on your tracking system. When you need to show the member status, compare this last transaction and logout time with current time then you can identify the status (active or idle)
Is this helpful?

Thanks
-Kathir
Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #4 (permalink)  
Old 08-03-2007, 03:14 AM
Jeyaseelansarc Jeyaseelansarc is offline
D-Web Genius
 
Join Date: Mar 2007
Location: Chennai
Posts: 1,162
Jeyaseelansarc is on a distinguished road
Send a message via AIM to Jeyaseelansarc
Default Re: Track User information

Hi Kathir,
Thank you for the answer.
As u said each and every time we track entire page and update the transaction date. It will work fine.

I will try with this way and let u know u after
__________________
With,
J. Jeyaseelan

Everything Possible
Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #5 (permalink)  
Old 08-03-2007, 04:17 AM
vivekanandan vivekanandan is offline
D-Web Trainee
 
Join Date: Jul 2007
Posts: 41
vivekanandan is on a distinguished road
Default Re: Track User information

Hi,

we can make use java script events, in the body element(unload event) we can write ajax code which updated the status in the current user in the unload event. if u found any good solution, please post it.

Regards,
Vivekanandan
Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #6 (permalink)  
Old 08-03-2007, 04:45 AM
Jeyaseelansarc Jeyaseelansarc is offline
D-Web Genius
 
Join Date: Mar 2007
Location: Chennai
Posts: 1,162
Jeyaseelansarc is on a distinguished road
Send a message via AIM to Jeyaseelansarc
Default Re: Track User information

Hi,
thanks for replying.

I have thought of solution to track the user's online as follows
1. In body onload call a function to track the every transaction user makes on ur site.
2. While checking user's online checking for proper logout time, if exists then the user should be offline. if not then get transaction date and compare with current date if the difference exceed the limit u fixed, then user should be out of ur site, then u came to know that the user is offline.

I have to follow these steps.

Is there any change needed?
__________________
With,
J. Jeyaseelan

Everything Possible
Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #7 (permalink)  
Old 08-03-2007, 04:58 AM
kingmaker kingmaker is offline
D-Web Genius
 
Join Date: Jun 2007
Posts: 882
kingmaker is on a distinguished road
Send a message via Yahoo to kingmaker
Thumbs up Re: Track User information

hi.....

if user closed the browser the unload event will not help you to track the user..because if u referesh the page also unload event will fire..

Below code is helpful to track the user while closing the browser

I have done the user tracking by ..

<script language="JavaScript">
<!--
function closeWindow(evt) {

var e = (window.event) ? window.event : evt;

if (e.clientX < 0 && e.clientY < 0)
{

(new Image()).src="logout.php?value=0";
alert("logout")

}

return true;
}

// -->
</script>
</head>
<body onunload="closeWindow(event)" >


but it works only in IE...not FF
__________________
The KINGMAKER
Makes Every Thing Possible

Stuffs (My Blog)

Last edited by kingmaker : 08-03-2007 at 05:01 AM.
Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #8 (permalink)  
Old 08-04-2007, 01:09 AM
Jeyaseelansarc Jeyaseelansarc is offline
D-Web Genius
 
Join Date: Mar 2007
Location: Chennai
Posts: 1,162
Jeyaseelansarc is on a distinguished road
Send a message via AIM to Jeyaseelansarc
Default Re: Track User information

hi,
i have already tried this!
As you said it is working fine on IE while close the browse window, but when i have tested for this while the user click browser back button, it does not support.

But i need to support both the browser (IE and FF)

Another issue for this is when the user change the url from address bar then how can we track the user login?
__________________
With,
J. Jeyaseelan

Everything Possible
Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #9 (permalink)  
Old 08-06-2007, 12:57 AM
Anand Anand is offline
D-Web Programmer
 
Join Date: Mar 2007
Posts: 52
Anand is on a distinguished road
Default Re: Track User information

hi Jeyaseelan,

Yes, to solve out this problem you need to update the time whenever the page gets navigated. From the last navigated time you can compare the time with the current time. If the duration exceeds the time u fixed, then the user might have closed page or the session might have expired. From this you can check whether the user is online or the logout time.
__________________
None of us is As Strong as All of us.
Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #10 (permalink)  
Old 08-06-2007, 03:06 AM
Jeyaseelansarc Jeyaseelansarc is offline
D-Web Genius
 
Join Date: Mar 2007
Location: Chennai
Posts: 1,162
Jeyaseelansarc is on a distinguished road
Send a message via AIM to Jeyaseelansarc
Default Re: Track User information

Hi Anand,
Thanks for your reply.
I have already done the same way which you have given here. This is working fine now. But if we have the better solution to track online and offline users, thats helping us.
Using ajax call i am storing the transaction date in DB.
__________________
With,
J. Jeyaseelan

Everything Possible
Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
How do you track your website visitors? montyauto PHP Programming 3 09-11-2007 03:25 AM
store information about user’s locale prasath ASP and ASP.NET Programming 1 08-18-2007 12:58 AM
How to track IPs of clients while requesting page sureshbabu PHP Programming 2 07-20-2007 08:27 AM
Track the mobile user prasath Mobile Software Development 0 07-16-2007 05:54 AM
How can track click? webmaster Search Engine Optimization 1 02-20-2007 04:05 AM


All times are GMT -7. The time now is 12:26 PM.


Copyright ©2004 - 2007, DiscussWeb. All Rights Reserved.

SEO by vBSEO 3.0.0