how many people are connected to me in a network?
Moderator: General Moderators
how many people are connected to me in a network?
hi guys,
i am new to php,so please bear with me if it is a stupid question.
is it possible to know how many people are connected to me in my network?Ok let me explain.WE all are working in one office and we have got one server to which everybody gets connected.Well I wan to know whether it is possible to know how many people are connected to it at any given time.I mean if some body logs on to his/her pc then i should be able to see him in my html/php page.once he/she turns off the pc then it should be noticed too.
thanks
saumya
i am new to php,so please bear with me if it is a stupid question.
is it possible to know how many people are connected to me in my network?Ok let me explain.WE all are working in one office and we have got one server to which everybody gets connected.Well I wan to know whether it is possible to know how many people are connected to it at any given time.I mean if some body logs on to his/her pc then i should be able to see him in my html/php page.once he/she turns off the pc then it should be noticed too.
thanks
saumya
not a stupid question, but a hard one to understand...
see, i don't know if you mean if you can tell if someone is logged onto your network, or onto your page?
either way, yes, you can definately find out how many people are connected to you and what their ip's are (among other things based on what OS you are using...)
see, i don't know if you mean if you can tell if someone is logged onto your network, or onto your page?
either way, yes, you can definately find out how many people are connected to you and what their ip's are (among other things based on what OS you are using...)
- n00b Saibot
- DevNet Resident
- Posts: 1452
- Joined: Fri Dec 24, 2004 2:59 am
- Location: Lucknow, UP, India
- Contact:
thank guys.well with a login screen its simple.but I do not want that.rather it should be autometically detect from my pc,how many people are there in my network.if they are turned on their pc then the screen should say "the particular use is on table.".can it be done?
thats like invisibly keeping an eye on them.I do not have access to myserver either.whatever I have to do is to do with my own pc.I am under a server and so as others.its actually should check how many people are currently loged in to to the main server.
thanks again for your help
saumya
thats like invisibly keeping an eye on them.I do not have access to myserver either.whatever I have to do is to do with my own pc.I am under a server and so as others.its actually should check how many people are currently loged in to to the main server.
thanks again for your help
saumya
- Chris Corbyn
- Breakbeat Nuttzer
- Posts: 13098
- Joined: Wed Mar 24, 2004 7:57 am
- Location: Melbourne, Australia
I think you can do something with sessions.... Can't quite remember what... there's a post by jason in the tutorial board on this I believe. 
viewtopic.php?t=29342
viewtopic.php?t=29342
- feyd
- Neighborhood Spidermoddy
- Posts: 31559
- Joined: Mon Mar 29, 2004 3:24 pm
- Location: Bothell, Washington, USA
So you want to find out how many people are on the LAN.. I'm assuming this is a Windows network, as I wouldn't know for a unix set up, but it should be similar..
The following should display all computers attached to the group/domain associated with the machine it is run on.
The following should display all computers attached to the group/domain associated with the machine it is run on.
Code: Select all
<?php
var_export(shell_exec('net view'));
?>- n00b Saibot
- DevNet Resident
- Posts: 1452
- Joined: Fri Dec 24, 2004 2:59 am
- Location: Lucknow, UP, India
- Contact:
Code: Select all
<?php
var_export(shell_exec('net view'));
?>n00b Saibot wrote:Yesterday, I thought of the same answer but forgot to post it afterwards.
Fire up the command prompt and type 'net view' and see what that returns.
did you try that and see if it actually displayed anything for you? Because there is no reason why it should not work if you have windows xp (unless you don't have high enough privelages to run the command...)