Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Does anyone has knowledge about the

Status
Not open for further replies.

gvishal

MIS
Oct 9, 2001
14
0
0
US
Does anyone has knowledge about the "shadowing". i.e how can we view the work being done on another computer but on the same server.

thanks
 
Sure, we have an include file on every ASP page that adds a record to a table everytime the page loads. The record contains the UserID, Name, Host IP, SessionID, Date, Time, and about three other fields explaining what the user did.

Then our technical support staff queries that table to see what visitors are doing on our site.

Need some help with that ??

ToddWW
 
sure, i definately need help with that.

thanks
 
OK, here's how we do it. First we setup a table in our database and name it access. It has the following fields.

date Date / Time Field
userid Character
remoteadd Character
sessionid Character
page Character
desc Character

Then at the top of every ASP page we initialize and set the description string like this.
Code:
<%
dim strDescr
strDescr = &quot;Updating the customer table&quot;
%>

Then the rest of the ASP page processes. During processing, depending on the specifics of the page, we may change that string to include certain form elements that were submitted to the page, etc.. Whatever you like. For example, when a user updates a customer and posts the information to a page, that page receiving the post might have something like this at the top.

Code:
<%
dim strDescr
strDescr = &quot;Updating the &quot; & Request.Form(&quot;customername&quot;) & &quot; customer table&quot;
%>

Then further down the page, we might add to that string like this.
Code:
<%
strDescr = strDescr & &quot; with &quot; & RS.RecordCount & &quot; records.&quot;
%>

Nontheless, when the code reaches the bottom of the page, we have that string set to exactly what has happened.

Then at the bottom of the page, we have an include reference like this.
Code:
</body>
</html>
<!-- #include file=&quot;access.inc&quot; -->

Here's what the access.inc file looks like.
Code:
<%
''''''''''''''''''''
'UPDATE ACCESS FILE'
''''''''''''''''''''
dim Conn
dim strSQL
Set Conn = Server.CreateObject(&quot;ADODB.Connection&quot;)
Conn.Open YOUR PROVIDER STRING OR DSN
strSQL = &quot;INSERT INTO access (date, userid, remoteadd, sessionid, page, desc) VALUES ({&quot; & Now & &quot;},'&quot; & Session(&quot;userid&quot;) & &quot;', '&quot; & Request.ServerVariables(&quot;REMOTE_ADDR&quot;) & &quot;', '&quot; & Request.ServerVariables(&quot;HTTP_COOKIE&quot;) & &quot;', '&quot; & Request.ServerVariables(&quot;PATH_INFO&quot;) & &quot;', '&quot; & strDescr & &quot;')&quot;
Conn.Execute strQuery
set Conn = Nothing
%>

Then we have a small ASP application that we use to get those values for a specific user, during a specific date and time that allows us to track what our users are doing.

Hope this helps..

ToddWW
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top