<?xml version="1.0" encoding="utf-8" ?><rss version="2.0" xml:base="https://www.webmaster-forums.net/crss/node/1041806" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title></title>
    <link>https://www.webmaster-forums.net/crss/node/1041806</link>
    <description></description>
    <language>en</language>
          <item>
    <title>Greg K wrote:
I like the</title>
    <link>https://www.webmaster-forums.net/web-programming-and-application-development/user-onlinelogged#comment-1232894</link>
    <description> &lt;p&gt;&lt;div class=&quot;quote-msg&quot;&gt;&lt;div class=&quot;quote-author&quot;&gt;&lt;em&gt;Greg K&lt;/em&gt; wrote:&lt;/div&gt;I like the idea of an active field so that if they manually log off it lists that.&lt;/p&gt;
&lt;p&gt;What I would do then is also in the part where you update the users time stamp, do a second call that will set Active=&quot;N&quot; where last ativity &amp;gt; 30 minutes.&lt;/p&gt;
&lt;p&gt;&lt;/div&gt;&lt;br /&gt;
Problem with that is they might not actually be logged out, just inactive, which is what the active field is for. N will allow me to state &quot;not logged in&quot; and dont even bother with the timestamp as they have manually logged out, whereas &quot;Y&quot; I will have to use the timestamp with IF &amp;gt;30mins echo user not logged in.&lt;/p&gt;
&lt;p&gt;It&#039;s a &quot;fake&quot; logged out notice really, and if the user becomes active again, timestamp &amp;lt;30 and therefore &quot;logged in&quot;, which of course would not work if I set Active to &quot;N&quot; after timestamp &amp;gt; 30.&lt;/p&gt;
&lt;p&gt;So the timestamp will only ever come into play if active=&quot;Y&quot;.&lt;br /&gt;
If I set Active to &quot;N&quot; after timestamp &amp;gt; 30 then I have stopped the functionality of the timestamp should they become inactive again in that same (logged in) session, and of course change from active to inactive numerous times.&lt;/p&gt;
&lt;p&gt;Thanks for the thoughts, it&#039;s put me on a good track and a decent setup!&lt;/p&gt;
 </description>
     <pubDate>Sun, 31 Aug 2008 16:11:00 +0000</pubDate>
 <dc:creator>greg</dc:creator>
 <guid isPermaLink="false">comment 1232894 at https://www.webmaster-forums.net</guid>
  </item>
  <item>
    <title>I like the idea of an active</title>
    <link>https://www.webmaster-forums.net/web-programming-and-application-development/user-onlinelogged#comment-1232893</link>
    <description> &lt;p&gt;I like the idea of an active field so that if they manually log off it lists that.&lt;/p&gt;
&lt;p&gt;What I would do then is also in the part where you update the users time stamp, do a second call that will set Active=&quot;N&quot; where last ativity &amp;gt; 30 minutes.&lt;/p&gt;
 </description>
     <pubDate>Sun, 31 Aug 2008 15:34:54 +0000</pubDate>
 <dc:creator>Greg K</dc:creator>
 <guid isPermaLink="false">comment 1232893 at https://www.webmaster-forums.net</guid>
  </item>
  <item>
    <title>decibel.places wrote:
You</title>
    <link>https://www.webmaster-forums.net/web-programming-and-application-development/user-onlinelogged#comment-1232888</link>
    <description> &lt;p&gt;&lt;div class=&quot;quote-msg&quot;&gt;&lt;div class=&quot;quote-author&quot;&gt;&lt;em&gt;decibel.places&lt;/em&gt; wrote:&lt;/div&gt;You can use $_SESSION and isset&lt;/p&gt;
&lt;p&gt;http://www.php-mysql-tutorial.com/user-authentication/basic-authentication.php&lt;/div&gt;&lt;br /&gt;
 That will only get any session data relevant to the user who access the page with that PHP on it.&lt;br /&gt;
Each person who accesses the site/server is given a unique id to each of the sessions relevant to them. So that wouldn&#039;t get all sessions for all users, just all sessions for that user.&lt;/p&gt;
 </description>
     <pubDate>Sun, 31 Aug 2008 14:11:00 +0000</pubDate>
 <dc:creator>greg</dc:creator>
 <guid isPermaLink="false">comment 1232888 at https://www.webmaster-forums.net</guid>
  </item>
  <item>
    <title>Greg K wrote:
Add a</title>
    <link>https://www.webmaster-forums.net/web-programming-and-application-development/user-onlinelogged#comment-1232887</link>
    <description> &lt;p&gt;&lt;div class=&quot;quote-msg&quot;&gt;&lt;div class=&quot;quote-author&quot;&gt;&lt;em&gt;Greg K&lt;/em&gt; wrote:&lt;/div&gt;Add a timestamp field for &quot;last on&quot;&lt;/div&gt;&lt;br /&gt;
Hmm&lt;/p&gt;
&lt;p&gt;That with the login/logout I mentioned in my first post might make a decent setup.&lt;br /&gt;
Still have an &quot;active&quot; field in the db, user logs in is a yes, user logs out is a no, that way if a user is definately logged out I can say so.&lt;br /&gt;
Then also, have a timestamp, and if say a user has not done anything for 10 mins they will be listed as inactive for xx mins, then after perhaps 30 mins of inactivity I could just list them as offline.&lt;/p&gt;
&lt;p&gt;&lt;div class=&quot;quote-msg&quot;&gt;&lt;div class=&quot;quote-author&quot;&gt;&lt;em&gt;Greg K&lt;/em&gt; wrote:&lt;/div&gt;each page should be checking the DB to validate permissions anyhow&lt;/div&gt;&lt;br /&gt;
yes, I have an include login check. some pages they have to be logged in and are redirected if not and some just serve member specific or public data  depending on their status.&lt;/p&gt;
 </description>
     <pubDate>Sun, 31 Aug 2008 14:08:50 +0000</pubDate>
 <dc:creator>greg</dc:creator>
 <guid isPermaLink="false">comment 1232887 at https://www.webmaster-forums.net</guid>
  </item>
  <item>
    <title>You can use $_SESSION and</title>
    <link>https://www.webmaster-forums.net/web-programming-and-application-development/user-onlinelogged#comment-1232873</link>
    <description> &lt;p&gt;You can use $_SESSION and isset&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;http://www.php-mysql-tutorial.com/user-authentication/basic-authentication.php&quot; title=&quot;http://www.php-mysql-tutorial.com/user-authentication/basic-authentication.php&quot;&gt;http://www.php-mysql-tutorial.com/user-authentication/basic-authenticati...&lt;/a&gt;&lt;/p&gt;
 </description>
     <pubDate>Sat, 30 Aug 2008 20:06:58 +0000</pubDate>
 <dc:creator>decibel.places</dc:creator>
 <guid isPermaLink="false">comment 1232873 at https://www.webmaster-forums.net</guid>
  </item>
  <item>
    <title>Technically, if you are on</title>
    <link>https://www.webmaster-forums.net/web-programming-and-application-development/user-onlinelogged#comment-1232870</link>
    <description> &lt;p&gt;Technically, if you are on your own server, you could access the files that contain the session data.&lt;/p&gt;
&lt;p&gt;IMO it is better to use the DB for this. Add a timestamp field for &quot;last on&quot;, as on a membership site, each page should be checking the DB to validate permissions anyhow. set this to updates this value, then when you want to check who is online, do a search in table for users whose time stamp is within the last, say 5 minutes.&lt;/p&gt;
&lt;p&gt;-Greg&lt;/p&gt;
 </description>
     <pubDate>Sat, 30 Aug 2008 17:53:38 +0000</pubDate>
 <dc:creator>Greg K</dc:creator>
 <guid isPermaLink="false">comment 1232870 at https://www.webmaster-forums.net</guid>
  </item>
  </channel>
</rss>
