Author |
Topic |
xMANIGHTx
Junior Member
Italy
191 Posts |
Posted - 17 February 2002 : 12:53:27
|
I'm not suggesting anything! Hehehe... by the way, if you think it could be useful to Snitz forum (sure it is on a whole site/intranet) then I'm glad to help as far as I can!
Distractly yours... manight@audiopro.it |
|
|
fpgal
New Member
93 Posts |
Posted - 17 February 2002 : 20:32:16
|
Oh, WOW!!!
Thank you, Kong, for sharing the log.asp file. It's working perfectly. And it is SO much easier to use the log now.
And thank you again, GauravBhabu, for this excellent code. It is exactly what I need. I even like it better than the Active Users MOD. I can't wait to see the changes you come up with. Thanks for taking the effort to create this.
fpgal
|
|
|
OneWayMule
Dev. Team Member & Support Moderator
Austria
4969 Posts |
Posted - 23 February 2002 : 19:08:19
|
Great work, GB (and Kong), works like a charm!
|
|
|
GauravBhabu
Advanced Member
4288 Posts |
Posted - 23 February 2002 : 19:20:33
|
I will be releasing the enhanced version soon
www.forumSquare.com - GauravBhabu - It is difficult to IMPROVE on Perfection, There is no harm in Keep Trying. |
|
|
dayve
Forum Moderator
USA
5820 Posts |
Posted - 23 February 2002 : 20:00:54
|
quote:
I will be releasing the enhanced version soon
www.forumSquare.com - GauravBhabu - It is difficult to IMPROVE on Perfection, There is no harm in Keep Trying.
looking forward to it... been watching and watching this thread in anticipation...
____________ dayve@burningsouls.com
http://www.nineinchnailz.com - your source for everything nine inch nails ! |
|
|
Neocyb
Starting Member
Belgium
19 Posts |
Posted - 13 March 2002 : 11:30:34
|
I know this is a little bit late to be replying to this topic but I have to say that I cannot use FileSystemObject (my hosting server doesn't allow it). Therefor I wrote a little program that eventually does LOG the same thing as it would in the textfile IPLOG.Txt but I made a little asp code to write it to a separate Access DB. I Tested it locally and it works very good no lag whatsoever. But haven't tested it on forums that are visited very frequantly. If anyone is interested in the code let me know.
Greetz NeoCyb
|
|
|
tangoc9999
Junior Member
USA
158 Posts |
Posted - 14 March 2002 : 11:24:41
|
i would be willing to test it in an access db environment.
TANGO
Computers run on smoke, when the smoke comes out, they quit running!
|
|
|
Neocyb
Starting Member
Belgium
19 Posts |
Posted - 14 March 2002 : 13:03:55
|
Here is the code just place it before :
set rsWho = Server.CreateObject("ADODB.Recordset") in inc_activeusers.asp
'LOGFILE Dim objRS Dim DB Dim SQLStr Set DB = Server.CreateObject("ADODB.Connection") DB.ConnectionString = "DRIVER={Microsoft Access Driver (*.mdb)}; DBQ=" & _ Server.MapPath("forumlog.mdb") & ";" DB.Open Set Objrs = Server.CreateObject ("ADODB.Recordset") SQLStr = "SELECT * FROM Log" ObjRs.Open SQLStr, DB, 3, 3 objrs.AddNew objrs("InTime") = strOnlineCheckinTime objrs("UserIP") = strOnlineUserIP if len(strOnlineLocation) > 254 then objrs("Script") = strOnlinePageName else objrs("Script") = strOnlineLocation end if objrs("UserName") = strOnlineUser objrs.update
DB.Close Set DB = Nothing Set Objrs = Nothing
Layout of DB : LOGID : AutoInc InTime : Text UserIP : Text Script : Text (255) Username : Text
Hope this is enough. Tell me if this code is NOT optimized because I tested it on a local server and works fine...
Greetz,
NeoCyb
EZ Riders Solution Center Forum
|
|
|
tangoc9999
Junior Member
USA
158 Posts |
Posted - 15 March 2002 : 09:53:12
|
thanks Neocyb i will try to work with it this weekend.
TANGO
Computers run on smoke, when the smoke comes out, they quit running!
|
|
|
samyot
Junior Member
Canada
242 Posts |
|
Arne2
New Member
Denmark
51 Posts |
Posted - 20 April 2002 : 01:43:37
|
Before updateing to Active Users 4.0 I had this code:
'######################## start LOG to TXT file dim iplg, logFile8 set iplg=server.createObject("scripting.FileSystemObject") set logFile8=iplg.openTextFile(server.mappath("/xx/xx/LOG.txt"),8) logFile8.write "<tr><td width=200><font size=-1>" & ChkDate(strOnlineCheckInTime) & " " & ChkTime(strOnlineCheckInTime) & "</font></td><td width=130><font size=-1>" & strOnlineUserIP & "</font></td><td width=500><font size=-1>" & strOnlineLocation & "</font></td><td width=160><font size=-1>" & strOnlineUser & "</font></td></tr>" & vbCrLf logFile8.close set logFile8=nothing set iplg=nothing '##################### End Log To TXT file
which was a really neat log with tables and by the help of global.asa was emailed to me and reset every 6 hours.
After installing Active Users 4.0 this did not work any more so I moved the code to the updated inc_functions.asp right below the
strUserIP = Request.ServerVariables("REMOTE_ADDR") strScriptName = Mid(Request.ServerVariables("SCRIPT_NAME"), InstrRev(Request.ServerVariables("SCRIPT_NAME"), "/")+1) strQueryString = Request.ServerVariables("QUERY_STRING") strUserAgent = Request.ServerVariables("HTTP_USER_AGENT") strCurrentTime = DateToStr(strForumTimeAdjust) about line 1500
'######################## start LOG to TXT file dim iplg, logFile8, arnehvem, spors spors = "" if strQueryString <> "" then spors = "?" & strQueryString end if
if MemberID = 0 then arnehvem="Guest" else arnehvem = strDBNTUserName end if
set iplg=server.createObject("scripting.FileSystemObject") set logFile8=iplg.openTextFile(server.mappath("/xx/xx/log.txt"),8)
logFile8.write "<tr><td width=200><font size=-1>" & ChkDate(strCurrentTime) & " " & ChkTime(strCurrentTime) & "</font></td><td width=130><font size=-1>" & strUserIP & "</font></td><td width=500><font size=-1>"& "<a href=" & """" & strHomeURL & strScriptName & spors & """>" & strScriptName & spors & "</a>" & "</font></td><td width=160><font size=-1>" & arnehvem & "</font></td></tr>" & vbCrLf logFile8.close set logFile8=nothing set iplg=nothing '##################### End Log To TXT file
It is not nearly as neat as it was when working with the older Active Users, but at least it gets the job done in some way. It would be nice if anyone made this better
Have a nice day, Arne
Edited by - Arne2 on 20 April 2002 05:41:32 |
|
|
Arne2
New Member
Denmark
51 Posts |
Posted - 20 April 2002 : 06:28:41
|
Here is my latest changes which makes it possible to do a WhoIs on All Nettools on the fly by just clicking on the IP in the log. I have not made this code neat, but passing it on just to give you ideas.
dim iplg, logFile8, arnehvem, spors, afipstreng spors = "" if strQueryString <> "" then spors = "?" & strQueryString end if afipstreng ="http://www.all-nettools.com/cgi-bin/sw.cgi?""" afipstreng = afipstreng + strUserIP + """" if MemberID = 0 then arnehvem="Guest" else arnehvem = strDBNTUserName end if
set iplg=server.createObject("scripting.FileSystemObject") set logFile8=iplg.openTextFile(server.mappath("/xx/xx/IPLOG.txt"),8)
logFile8.write "<tr><td width=200><font size=-1>" & _ ChkDate(strCurrentTime) & " " & ChkTime(strCurrentTime) & _ "</font></td><td width=130><font size=-1>" & "<a href=" & """" & afipstreng & ">" & strUserIP & "</a>" & _ "</font></td><td width=500><font size=-1>"& "<a href=" & """" & _ strHomeURL & strScriptName & spors & """>" & strScriptName & _ spors & "</a>" & "</font></td><td width=160><font size=-1>" & _ arnehvem & "</font></td></tr>" & vbCrLf logFile8.close set logFile8=nothing set iplg=nothing
Have a nice weeked everybody! Arne
|
|
|
opmjdv
Starting Member
USA
3 Posts |
Posted - 03 May 2002 : 23:26:00
|
Nice add-on...
Have you looked further into packing it as a mod that works with SQL? This way you could build several Queries (like users since xx/xx/xxxx or sumthin else) I prefer to stick to SQL instead of flat file...
|
|
|
MaD2ko0l
Senior Member
United Kingdom
1053 Posts |
Posted - 17 May 2002 : 15:25:13
|
hey i need soem help plz.
when i had active users 3.5 i had this code
Dim objRS Dim DB Dim SQLStr Set DB = Server.CreateObject("ADODB.Connection") DB.ConnectionString = "DRIVER={Microsoft Access Driver (*.mdb)}; DBQ=" & _ Server.MapPath("UserLog.mdb") & ";" DB.Open Set Objrs = Server.CreateObject ("ADODB.Recordset") SQLStr = "SELECT * FROM Log" ObjRs.Open SQLStr, DB, 3, 3 objrs.AddNew objrs("InTime") = strOnlineCheckinTime objrs("UserIP") = strOnlineUserIP if len(strOnlineLocation) > 254 then objrs("Script") = strOnlinePageName else objrs("Script") = strOnlineLocation end if objrs("UserName") = strOnlineUser objrs.update
DB.Close Set DB = Nothing Set Objrs = Nothing
now wot do i need to do to get it to work again????
© 1999-2002 MaD2ko0l -=[ Life Is So Easy When You Are Evil ]=-
Edited by - MaD2ko0l on 17 May 2002 15:25:58 |
|
|
HarshReality
Junior Member
USA
128 Posts |
Posted - 01 June 2002 : 05:19:37
|
OK if anyone has it can somebody send me GauravBhabu's log addition that breaks it down by the day, I just left mine alone for a week and had to clear out a single 12 meg file :/
Would still Love to see GauravBhabu's interface as well
Anti Social Personality |
|
|
Topic |
|