I'm logging employees' internet access for compliance with company policy. As soon as an employee visits a blocked site, he is redirected to a warning page (on the intranet). This warning page gets their IP addresses & emails them to the IT department. I also need their usernames.I have found 3 different solutions which all work from //localhost/ (when the page is run from the client's PC). However, this warning page will be on the intranet & I need to know whether it would work from the intranet or not? Or what modifications do I need to make? Here are the 3 ways:
1. ASP

<%
Response.Write Request.ServerVariables("LOGON_USER")
%>

2. VBScript

<SCRIPT LANGUAGE="VBScript">
Dim objNet
On Error Resume Next 'If fail to create object then display error
' (press no message)
Set objNet = CreateObject("WScript.NetWork")
If Err.Number <> 0 Then 'If err
MsgBox "Do not press ""No"" If your browser warns you."
Document.Location = "info.html" 'Display document by placing name again
End if

Dim strInfo
strInfo = "User Name is " & objNet.UserName & vbCRLF & _
"Computer Name is " & objNet.ComputerName & vbCRLF & _
"Domain Name is " & objNet.UserDomain
MsgBox strInfo

document.write(strInfo)

Set objNet = Nothing 'Destroy the Object
</SCRIPT>

3. Reading a File from employee's PC

Is there a way to read a file from employees' PC from the intranet - without them knowing?

Thank a lot in advance.

Is there a way to read a file from employees' PC from the intranet - without them knowing?

Thank a lot in advance.

if you have administrator access there is.

hi, dimaYasny is right..you should have an adminsitrator account to do this..but i think it's against the odds..reading files of other users without their permissions..once they know about this, they will screwed you up...

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.