Visual Basic Programming
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me

The Shed is going Social! Join us on FaceBook and Twitter and chime in on the conversation.

Go Back   Dev Shed ForumsProgramming Languages - MoreVisual Basic Programming

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old July 5th, 2012, 07:25 AM
jrp1982 jrp1982 is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jul 2012
Posts: 1 jrp1982 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 28 m 39 sec
Reputation Power: 0
VBScript help

Hey guys.

Hope everyone here had a great 4th of July holiday!

I am building an internal site that of course is only accessible via intranet. Its primary coding is very simple. Its HTML based with some Javascript and some VBScript. I will be honest. I am not an expert programmer by any means. So here is the issue.

We have no access to the server logs as we do not admin the logs nor are we allowed to request them. We are basically borrowing the space.

My management wants to have each page, when accessed or clicked on (either one) to log the hit to a csv file and a txt file saved on the server. I know a lot of people dont think VBScript is the way to go. This is what is needed in each column in the log:

Date\Time stamp \ Hostname \ NT Login \ Current page name that was loaded or clicked on from my menu (without the full URL)

We are in a Windows XP\7 Environment. We know this server supports IIS. We are also currently using SSI for our DHMTL menu. I was hoping someone could help me use the DHTML menu as an "onclick" so that any option clicked on the menu by the client would log the above information to a specific file. We are very limited on the access we have on the server. Any advice or assistance would be helpful. I am pretty much stuck here. I need the HTML page to somehow call a VBS Script file, and when called have the VBS file log the data I posted above.

I am not very skilled in VBS at all and this is simply a last minute side project they want to test out. So if someone could help me with this that would be excellent. Thank you in advance.

Reply With Quote
  #2  
Old July 5th, 2012, 08:14 PM
Doug G Doug G is offline
Grumpier Old Moderator
Dev Shed God 19th Plane (14000 - 14499 posts)
 
Join Date: Jun 2003
Posts: 14,237 Doug G User rank is General 52nd Grade (Above 100000 Reputation Level)Doug G User rank is General 52nd Grade (Above 100000 Reputation Level)Doug G User rank is General 52nd Grade (Above 100000 Reputation Level)Doug G User rank is General 52nd Grade (Above 100000 Reputation Level)Doug G User rank is General 52nd Grade (Above 100000 Reputation Level)Doug G User rank is General 52nd Grade (Above 100000 Reputation Level)Doug G User rank is General 52nd Grade (Above 100000 Reputation Level)Doug G User rank is General 52nd Grade (Above 100000 Reputation Level)Doug G User rank is General 52nd Grade (Above 100000 Reputation Level)Doug G User rank is General 52nd Grade (Above 100000 Reputation Level)Doug G User rank is General 52nd Grade (Above 100000 Reputation Level)Doug G User rank is General 52nd Grade (Above 100000 Reputation Level)Doug G User rank is General 52nd Grade (Above 100000 Reputation Level)Doug G User rank is General 52nd Grade (Above 100000 Reputation Level)Doug G User rank is General 52nd Grade (Above 100000 Reputation Level)Doug G User rank is General 52nd Grade (Above 100000 Reputation Level) 
Time spent in forums: 1 Month 4 Weeks 14 h 50 m 19 sec
Reputation Power: 4445
Start by locating the vbscript and IIS documentation in the msdn library and read up on what you can and can't do. It sounds like you're asking for the ability for your client computer to run a script on the server, and you can't do that unless you use some server stuff like active server pages, php, etc.

If this is important why don't you get a site where you have access to the server log files.
__________________
======
Doug G
======
It is a truism of American politics that no man who can win an election deserves to. --Trevanian, from the novel Shibumi

Reply With Quote
  #3  
Old July 7th, 2012, 11:25 AM
couttsj couttsj is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Aug 2011
Posts: 166 couttsj User rank is Sergeant Major (2000 - 5000 Reputation Level)couttsj User rank is Sergeant Major (2000 - 5000 Reputation Level)couttsj User rank is Sergeant Major (2000 - 5000 Reputation Level)couttsj User rank is Sergeant Major (2000 - 5000 Reputation Level)couttsj User rank is Sergeant Major (2000 - 5000 Reputation Level)couttsj User rank is Sergeant Major (2000 - 5000 Reputation Level) 
Time spent in forums: 2 Days 16 h 53 m 29 sec
Reputation Power: 43
I don't know if your server supports ASP code, but the following demonstrates how a web page would append to a text file on the server using ASP. In this case, the server is taking comma separated SQL string information sent to it using a "Post" function and adds it to a text file. Another program periodically polls the file, recovers the SQL data, adds it to a database, and deletes the line. Logfile entries would be simpler and would not utilize the "Post" function, but you get the idea.

J.A. Coutts
Code:
<html>
<body>

<form action="mantapost.asp" method="post">
<input type="text" name="query">
</form>

<%
Dim ObjFSO
Dim objFile
If Request.Form<>"" Then
  Response.Write("Requested: " & Now & "<br>")
  Set objFSO = CreateObject("Scripting.FileSystemObject")
  Set objFile = objFSO.OpenTextFile(Server.MapPath("..\..\..\MantaData\Query.sql"), 8)
  objFile.WriteLine(Request.Form)
  objFile.Close
  Set objFile = Nothing
  Set objFSO = Nothing
  Response.Write("Processed: " & Now)
End If
%>

</body>
</html>

Reply With Quote
Reply

Viewing: Dev Shed ForumsProgramming Languages - MoreVisual Basic Programming > VBScript help

Developer Shed Advertisers and Affiliates



Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump

Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 


Powered by: vBulletin Version 3.0.5
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.

© 2003-2013 by Developer Shed. All rights reserved. DS Cluster - Follow our Sitemap