PDA

View Full Version : Simple users online question


fonzerelli_79
09-29-2002, 10:07 AM
this is a very simple question - so simple i cant seem to figure it out ;)

all i want to do is pull the number of users from my forum and print the number on my main site - eg. 4 users in forums etc

which table would i get this figure from - is it the session table??

cheers

Xenon
09-29-2002, 05:09 PM
<a href="https://vborg.vbsupport.ru/showthread.php?s=&threadid=38012&highlight=of+users+on+forumhome" target="_blank">https://vborg.vbsupport.ru/showt...s+on+forumhome</a>

fonzerelli_79
10-01-2002, 11:05 AM
thanks

fonzerelli_79
10-05-2002, 11:32 AM
ive been so busy this is the first chance ive had to have a look at this but its not what im looking for

i want the total number of users online on a non vb page

so if there 5 guests and 6 members on i want 11 users online in forums to appear on my non vb page

is there something like this :D

Xenon
10-05-2002, 03:00 PM
ahh, sorry i missunderstood.

your nonvb Mainpage must require global.php in the first place.
then add this line into your file:
$loggedins=$DB_site->query_first("SELECT DISTINCT SUM(IF(userid>0,1,0)) AS regged, SUM(IF(userid=0,1,0)) AS guests
FROM session
WHERE session.lastactivity>$datecut
");

then you should be able to use $loggedins[regged] and $loggedins[guests] in your script

fonzerelli_79
10-05-2002, 03:50 PM
the page i want this on though isnt just a non vb page - its a different domain - does this make a difference at all :D

Xenon
10-05-2002, 03:53 PM
hmm, yes i think that would make differences, but i'm not sure
i don't know too much about working on different servers and combine the content ;)

the easiest way is to create a file onto your vb-server and just include this file from outside then..

fonzerelli_79
10-05-2002, 03:57 PM
yeah - that will probably work:D

ill try that (by the way - you can see what im trying to do at the left hand side of www.affiliate-review.com , this might explain it better than i can)