Board index   FAQ   Search  
Register  Login
Board index php forum :: php coding PHP coding => General

### Users Online

Ask about general coding issues or problems here.

Moderators: macek, egami, gesf

### Users Online

Postby Xerpher » Thu Sep 05, 2002 1:36 pm

I have made my own user login system for my site and its working great but.... I want to have an "active users list". I was thinking something like having all logged in users send a variable to the server so that the server generates the list or something like that. Could somebody tell me basically what I'll have to do to make an "active users list"?
Xerpher
New php-forum User
New php-forum User
 
Posts: 164
Joined: Tue Aug 27, 2002 8:25 pm
Location: Ontario, Canada

Postby Jay » Thu Sep 05, 2002 2:16 pm

Well, PHP doesn't support server side variables like ASP, so you're going to have to do it with a database or something. Every time someone accesses a page, enter the session ID and time into the database. Then to find out how many people are online you just count how many distinct session ID's there are in the last X minutes! That's the general gist, you'll have to develop your own method depending on how your site works.

On mine I log everything, so I can tell where people are, how many people visiting a particular page, and a particular version ('cos different variables generate different pages), how many registered, etc etc etc! Start off small, and then built it up as you go on!
Jay
 

Postby Xerpher » Thu Sep 05, 2002 4:30 pm

Good Idea, I'll hook it in to my MySQL database... Whats your site Jay?
Xerpher
New php-forum User
New php-forum User
 
Posts: 164
Joined: Tue Aug 27, 2002 8:25 pm
Location: Ontario, Canada

Postby Jay » Fri Sep 06, 2002 1:58 am

Xerpher wrote:Good Idea, I'll hook it in to my MySQL database... Whats your site Jay?

Tailored Mobile, but it's still a work in progress! If you want to see the stats, look at the source coding and it's right at the bottom! Also the site doesn't look like that much when you look at it, but a lot of the processing is done on the backend. The menus etc dynamically generate themselves!
Jay
 

Postby Xerpher » Fri Sep 06, 2002 3:32 am

Nice site, I like the "Info - Text Files" link :D
Xerpher
New php-forum User
New php-forum User
 
Posts: 164
Joined: Tue Aug 27, 2002 8:25 pm
Location: Ontario, Canada

Postby Jay » Sat Sep 07, 2002 1:39 am

Xerpher wrote:Nice site, I like the "Info - Text Files" link :D

Thanks, it's more or less done now, I just can't find the time to complete it!
Jay
 


Return to PHP coding => General

Who is online

Users browsing this forum: Google [Bot] and 2 guests

Sponsored by Sitebuilder Web hosting and Traduzioni Italiano Rumeno and antispam for cPanel.