Jump to content

retrieve computer info


sheepz

Recommended Posts

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

[code]
<?

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

?>
[/code]

what's the code for the rest of the info? thanks for help
Link to comment
Share on other sites

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.
Link to comment
Share on other sites

[!--quoteo(post=360302:date=Mar 31 2006, 01:23 AM:name=wildteen88)--][div class=\'quotetop\']QUOTE(wildteen88 @ Mar 31 2006, 01:23 AM) [snapback]360302[/snapback][/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
Link to comment
Share on other sites

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.
Link to comment
Share on other sites

[!--quoteo(post=360649:date=Apr 1 2006, 09:59 AM:name=txmedic03)--][div class=\'quotetop\']QUOTE(txmedic03 @ Apr 1 2006, 09:59 AM) [snapback]360649[/snapback][/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! =)
Link to comment
Share on other sites

[!--quoteo(post=360706:date=Apr 1 2006, 03:59 PM:name=sheepz)--][div class=\'quotetop\']QUOTE(sheepz @ Apr 1 2006, 03:59 PM) [snapback]360706[/snapback][/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.
Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.