darth bsr
05-11-2004, 08:05 AM
Does anybody know how I can get the Windows Username of my visitors? And could you please post your script in a running HTML.file? I know it can be done with ASP, unfortunately, that's no option...
|
Click to See Complete Forum and Search --> : Windows username darth bsr 05-11-2004, 08:05 AM Does anybody know how I can get the Windows Username of my visitors? And could you please post your script in a running HTML.file? I know it can be done with ASP, unfortunately, that's no option... buntine 05-11-2004, 08:12 AM It can only be done from the server... HTML definetely cannot do it. There 'may' be a JavaScript alternative, but it would not be very well supported. Regards. darth bsr 05-11-2004, 09:11 AM Well, it posted this similar message on the Java-board, and it dropped to page three within one day... buntine 05-11-2004, 09:14 AM What are your options? Which languages can you use on your server? Regards. darth bsr 05-11-2004, 10:00 AM PHP and Javascript. We tried VBscript but the windows scripting host is not installed here. Are there VBScripts that don't use WSH? buntine 05-11-2004, 11:38 AM JavaScript is client side. So the server cant influence it. Same applies to VBScript. Your server may not have support for ASP, but VBScript will work. To my knowledge, it cannot be done with PHP. ASP may be the only option. Regards, Andrew Buntine. CardboardHammer 05-11-2004, 12:42 PM If users have to log in using Windows Authentication to view pages, and you set the event logging on your server appropriately, you'll be able to find the info in the server's logs. darth bsr 05-12-2004, 02:21 AM I'm trrying very hard to prevent a logging in. It is a system on which users can report incidents involving the IT-infrastructure etc. so making a login screen is an extra step for the users. These users will be a little disgruntled to begin with, because their computer isn't acting the way they want it to. So logging on really is but a last resort... georgoz 07-30-2005, 02:49 PM i had the same problem with creating intranet pages. i needed user accounts. but why force users to type their usernames and passwords if i can get it from windows? well, the solution is not nice, but at least it is working. i created simple logon script, which contains this line: echo %USERNAME% > \\server\intranet$\userdata\%COMPUTERNAME%.txt and from php script i can access the very right file a read the username. this solutions is only useable when users use their own accounts. PipoUru 01-10-2006, 05:41 PM There must be a way to catch the windows username, but this is a nice workarround. I try some ways and put here the results. See u. :rolleyes: i had the same problem with creating intranet pages. i needed user accounts. but why force users to type their usernames and passwords if i can get it from windows? well, the solution is not nice, but at least it is working. i created simple logon script, which contains this line: echo %USERNAME% > \\server\intranet$\userdata\%COMPUTERNAME%.txt and from php script i can access the very right file a read the username. this solutions is only useable when users use their own accounts. georgoz 02-01-2006, 10:21 AM I realized that I cant access the file by the name of the client computer. So I had to do a few changes. Now I access the file using IP adrress. The biggest problem was to extract the ip address from windows command line. There is my code: @echo off for /f "delims=[ tokens=2" %%X in ('ping %computername% -n 1 -w 1 ^| find "PING"') do ( for /f "delims=] tokens=1" %%C in ("%%X") do echo %username% %computername% %date% %time% > %%C ) It creates a filename named by IP address with username, computer name, date and time inside. Now I am able to access it using REMOTE_ADDR. It is working on Win2k and WinXP. I am not sure about WinNT. webdeveloper.com
Copyright WebMediaBrands Inc., All Rights Reserved. |