Jump to content


Photo

retrieve computer info


  • Please log in to reply
7 replies to this topic

#1 sheepz

sheepz
  • Members
  • PipPip
  • Member
  • 14 posts

Posted 31 March 2006 - 07:18 AM

hi, i want to make a php page so when a user opens the site it will show his:

1. Computer name
2. User name
3. Domain
4. IP address
5. Time

i did a search and found how to display the IP address

<?

$address=getenv("REMOTE_ADDR");
echo "Your current computers IP address is $address.";

?>

what's the code for the rest of the info? thanks for help

#2 txmedic03

txmedic03
  • Members
  • PipPipPip
  • Advanced Member
  • 313 posts
  • LocationCall, TX, USA

Posted 31 March 2006 - 09:10 AM

1. Computer name
2. User name
3. Domain
4. IP address
5. Time

Well, what username are you looking for and why? The domain you can simply resolve the IP address. The time you just need their GMT offset. I don't believe there is any way you can get the computer name with PHP. If there is it is news to me.

SEMPER FIDELIS!

I can't stop you from doing something silly, but at least I can help you do it right.


#3 wildteen88

wildteen88
  • Staff Alumni
  • Advanced Member
  • 10,482 posts
  • LocationUK, Bournemouth

Posted 31 March 2006 - 09:23 AM

You can only get the IP address of the client you can not get any other details that you have stated above from the client computer.

#4 sheepz

sheepz
  • Members
  • PipPip
  • Member
  • 14 posts

Posted 31 March 2006 - 05:11 PM

[!--quoteo(post=360302:date=Mar 31 2006, 01:23 AM:name=wildteen88)--][div class=\'quotetop\']QUOTE(wildteen88 @ Mar 31 2006, 01:23 AM) View Post[/div][div class=\'quotemain\'][!--quotec--]
You can only get the IP address of the client you can not get any other details that you have stated above from the client computer.
[/quote]


oh i thought i would be able to get the login name and domain. the reason is becase at my work we use remote desktop software, and the computer name or IP is needed. i thought i could make a list of user info like the ones stated, didn't know php isn't able to do it. i thought it was able to pull off info from the client that connects to the website... thought if i was gonna grab the IP might as well grab the rest of the info, thanks for the info

#5 txmedic03

txmedic03
  • Members
  • PipPipPip
  • Advanced Member
  • 313 posts
  • LocationCall, TX, USA

Posted 01 April 2006 - 05:59 PM

You can request the information from the client and store it in a database. Provided that your network(s) doesn't use a dhcp you will be able to associate a username/computer name/IP/domain/time in the database. If it is a LAN or you know all the timezones involved you can get the time. You could create a management system to track the domains, IPs and systems on your network(s) as well as timezone or time in and out. PHP is a very powerful scripting language, but it does have limits. You can't be microsoft and just make up the rules whenever you like, but you can find ways to remain within the bounds of what is permissible and still achieve your goal.

SEMPER FIDELIS!

I can't stop you from doing something silly, but at least I can help you do it right.


#6 sheepz

sheepz
  • Members
  • PipPip
  • Member
  • 14 posts

Posted 01 April 2006 - 09:59 PM

[!--quoteo(post=360649:date=Apr 1 2006, 09:59 AM:name=txmedic03)--][div class=\'quotetop\']QUOTE(txmedic03 @ Apr 1 2006, 09:59 AM) View Post[/div][div class=\'quotemain\'][!--quotec--]
You can request the information from the client and store it in a database. Provided that your network(s) doesn't use a dhcp you will be able to associate a username/computer name/IP/domain/time in the database. If it is a LAN or you know all the timezones involved you can get the time. You could create a management system to track the domains, IPs and systems on your network(s) as well as timezone or time in and out. PHP is a very powerful scripting language, but it does have limits. You can't be microsoft and just make up the rules whenever you like, but you can find ways to remain within the bounds of what is permissible and still achieve your goal.
[/quote]


unfortunately my work place does use dhcp. i like the work around suggestion tho, i would have to learn more php before i could start connecting to a database and track computers on the network. thanks for the helpful thoughts! =)

#7 txmedic03

txmedic03
  • Members
  • PipPipPip
  • Advanced Member
  • 313 posts
  • LocationCall, TX, USA

Posted 01 April 2006 - 10:12 PM

[!--quoteo(post=360706:date=Apr 1 2006, 03:59 PM:name=sheepz)--][div class=\'quotetop\']QUOTE(sheepz @ Apr 1 2006, 03:59 PM) View Post[/div][div class=\'quotemain\'][!--quotec--]
unfortunately my work place does use dhcp. i like the work around suggestion tho, i would have to learn more php before i could start connecting to a database and track computers on the network. thanks for the helpful thoughts! =)
[/quote]

Static IP addressing would make it a lot better, but it all depends on the size of the network and how it is configured.

SEMPER FIDELIS!

I can't stop you from doing something silly, but at least I can help you do it right.


#8 txmedic03

txmedic03
  • Members
  • PipPipPip
  • Advanced Member
  • 313 posts
  • LocationCall, TX, USA

Posted 02 April 2006 - 06:09 AM

Another thought occured to me...do you have the ability to make any changes to the network? I may have a couple ideas if so.

SEMPER FIDELIS!

I can't stop you from doing something silly, but at least I can help you do it right.





0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users