Stefan Motz
asked on
Capture the web page visitor's computer name
Hi Experts,
I would like to display content on a web page based by the logged in user's computer name.
i.e.
If computer name is 'ABC123' then the web page displays 'XXX Content'
If computer name is 'XYZ123' then the web page displays 'WWW Content'
If computer name is not in the database then the web page displays 'You are not registered'
The computer names are retrieved from a SQL Server database.
Is there any script that can capture the visitor's computer name and display the content accordingly?
I am using classic ASP.
Thank you for your help.
I would like to display content on a web page based by the logged in user's computer name.
i.e.
If computer name is 'ABC123' then the web page displays 'XXX Content'
If computer name is 'XYZ123' then the web page displays 'WWW Content'
If computer name is not in the database then the web page displays 'You are not registered'
The computer names are retrieved from a SQL Server database.
Is there any script that can capture the visitor's computer name and display the content accordingly?
I am using classic ASP.
Thank you for your help.
ASKER
All users accessing the web page have computer names as this is an internal web site. This wouldn't be an issue in my case.
The problem is that users are accessing the web page from different browsers, like IE, Firefox, Chrome.
I found a JavaScript that works only in IE. I'm looking for one that works in all browsers. This is the one that works only in IE:
<script type="text/javascript">
var network = new ActiveXObject('WScript.Net work');
document.write(network.com puterName) ;
</script>
Dr. Klahn, thank you for your response.
The problem is that users are accessing the web page from different browsers, like IE, Firefox, Chrome.
I found a JavaScript that works only in IE. I'm looking for one that works in all browsers. This is the one that works only in IE:
<script type="text/javascript">
var network = new ActiveXObject('WScript.Net
document.write(network.com
</script>
Dr. Klahn, thank you for your response.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Thank you very much Scott, HOST_NAME() did it!
Not all computers have names, and many (I dare say most) systems do not respond on the identd port.
But even If there is such a script, it will not work reliably. The recent versions of Firefox, and the Brave browser, do their utmost to avoid revealing any information about the host computer to the web site.