Jump to content

Archived

This topic is now archived and is closed to further replies.

oracle259

retrieving client side information using php

Recommended Posts

Hey do you guys know of any way that i can retrieve the computer name of a computer on a domain using php or a combination of php and javascript.

say eg that the name given to my computer by the MIS dept is OSP1 on domain NETDOMAIN how can i retrieve the OSP1 computer name using php or php + javascript

Share this post


Link to post
Share on other sites
Ah.
You could probably have a bot hit the who-is database and do a search for it, and see what you can find, and then extract that piece of data.  However the who-is might not allow that, so you might want to check there terms of service, or be careful or they could block your ip.

Share this post


Link to post
Share on other sites
I can't test this until I get into the office tomorrow and back on the network but perhaps

[code]
<?php
$hostname = gethostbyaddr($_SERVER['REMOTE_ADDR']);
 
echo $hostname;
?>
[/code]

Share this post


Link to post
Share on other sites

×

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.