altf4
Posts: 1035
Joined: Mon Feb 04, 2008 8:05 pm
Location: Thailand
Contact: Website

BETA2: detect online users (website)

Sun Jun 29, 2008 10:33 am

is there a documentation about beta servers behavour in general ?

just out of couriousity ..

there is somethings changed in the session handling
before is used this statement to get website users in our backoffice system.

Code: Select all

SELECT user_id,`timestamp`,`ipaddress`,`expire` FROM  `sessions` 
WHERE TIMESTAMPDIFF( HOUR ,  `expire` , NOW( ) ) <".($hours+($timezoneoffset/3600))." 
AND ipaddress !=  'address'
ORDER BY `timestamp` DESC 
somehow this command now shows units too .. ;-)

i assume the sessiondata have now also Ipadresses for units (wich make alot of sense)
but dissables my function ...

is there another way to get the source of the session without fetching devicedata and compare them ;-)



--
Backups are for WIMPS!
http://0x8.in.th/where (website position GpsGate Powered)

User avatar
johan
GpsGate
Posts: 15145
Joined: Wed Aug 04, 2004 10:40 pm
Location: Sweden
Contact: Website

RE: BETA2: detect online users (website)

Sun Jun 29, 2008 2:15 pm

Yes, it makes sense to add a device_id to the sessions table. I will see what we can do to the next beta.

Regards,
Johan

Franson Support

altf4
Posts: 1035
Joined: Mon Feb 04, 2008 8:05 pm
Location: Thailand
Contact: Website

RE: BETA2: detect online users (website)

Mon Jun 30, 2008 11:02 am

great ..
well for now i have a solution already.

all units have the port as well in the session ... the website user not
so simply search for the ':' in the ipaddress collum ;-)

this will do it for now:

Code: Select all

SELECT user_id,`timestamp`,`ipaddress`,`expire` FROM  `sessions` 
WHERE TIMESTAMPDIFF( HOUR ,  `expire` , NOW( ) ) <".($hours+($timezoneoffset/3600))." 
AND ipaddress NOT LIKE '%:%'
ORDER BY `timestamp` DESC


--
Backups are for WIMPS!
http://0x8.in.th/where (website position GpsGate Powered)

Return to “GpsGate Server - How to setup and use”