By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
435,512 Members | 3,847 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 435,512 IT Pros & Developers. It's quick & easy.

"how many users online" with PHP: session or DB?

P: n/a
http://codewalkers.com/seecode/75.html
http://www.webkreator.com/php/concep...-with-php.html

The following two URLs illustrate different approaches to the idea of
showing "how many
users online" issue. I am looking at two different sites where I am looking
into implementing
this type of script; one that has mySQL and one that has no db access of any
kind; both use
PHP 4.1.

I (for once) understand what I would need to do to implement it; problem
comes in as to which
solution would be the fastest, most efficient and most secure considering
that one of them
deals with sessions (then there is the cookie issue, but that's another
issue altogether,
see http://www.webkreator.com/php/config...-security.html on
security issues
and cookies/sessions).

What would one best recommend I use: the PHP/mySQL solution (for the non-db
issue I would have
to write complicated XML procedures instead), or sessions?

Oh, more info:

Site #1 (has mySQL) is Linux/Apache ??/mySQL 3.23.41 and PHP 4.1
Site #2 (has no DB) is generic UNIX/Apache ?? and PHP 4.1

Thanx
Phil
Jul 17 '05 #1
Share this Question
Share on Google+
2 Replies


P: n/a
"Phil Powell" <so*****@erols.com> wrote in message news:<ldFpb.328$oB3.161@lakeread03>...
http://codewalkers.com/seecode/75.html
This is just a guess work.
http://www.webkreator.com/php/concep...-with-php.html


Good. But, won't work if session gc probability is less.

Better method is to go for own session handler that use DB. And
counting the records in the session table.

---
"Success = 10% sweat + 90% tears"
Email: rrjanbiah-at-Y!com
Jul 17 '05 #2

P: n/a
Phil Powell wrote:
What would one best recommend I use: the PHP/mySQL solution (for the non-db
issue I would have
to write complicated XML procedures instead), or sessions?


How about a shared memory approach,
instead of database. This would be the
fastest, I think - no access to HDD (unless
swapping is involved).

--
Seks, seksić, seksolatki... news:pl.soc.seks.moderowana
http://hyperreal.info { iWanToDie } WiNoNa ) (
http://szatanowskie-ladacznice.0-700.pl foReVeR( * )
Poznaj jej zwiewne kształty... http://www.opera.com 007
Jul 17 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.