Programming Help
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
 
User Name:
Password:
Remember me
Go Back   ASP Free ForumsOtherProgramming Help

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 ASP Free Forums Sponsor:
  #1  
Old August 16th, 2006, 11:10 PM
X74SY X74SY is offline
Registered User
ASP Free Newbie (0 - 499 posts)
 
Join Date: Aug 2006
Posts: 5 X74SY User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 1 h 15 m 50 sec
Reputation Power: 0
Question I need this (ASP Application: Site Statistics) Installed on my website please help!

Is there anyone here that could help me install this site statistics ASP script on my website?

Here's the script:
http://authors.aspalliance.com/stevesmith/samples/sitestats.asp

Please Help,

Thanks!

Reply With Quote
  #2  
Old August 17th, 2006, 01:28 AM
nofriends's Avatar
nofriends nofriends is offline
Senior Water Wizard
ASP Free God 11th Plane (10000 - 10499 posts)
 
Join Date: Aug 2004
Location: Cape Town, RSA
Posts: 10,181 nofriends User rank is Brigadier General (60000 - 70000 Reputation Level)nofriends User rank is Brigadier General (60000 - 70000 Reputation Level)nofriends User rank is Brigadier General (60000 - 70000 Reputation Level)nofriends User rank is Brigadier General (60000 - 70000 Reputation Level)nofriends User rank is Brigadier General (60000 - 70000 Reputation Level)nofriends User rank is Brigadier General (60000 - 70000 Reputation Level)nofriends User rank is Brigadier General (60000 - 70000 Reputation Level)nofriends User rank is Brigadier General (60000 - 70000 Reputation Level)nofriends User rank is Brigadier General (60000 - 70000 Reputation Level)nofriends User rank is Brigadier General (60000 - 70000 Reputation Level)nofriends User rank is Brigadier General (60000 - 70000 Reputation Level)nofriends User rank is Brigadier General (60000 - 70000 Reputation Level)nofriends User rank is Brigadier General (60000 - 70000 Reputation Level)  Folding Points: 97791 Folding Title: Advanced FolderFolding Points: 97791 Folding Title: Advanced FolderFolding Points: 97791 Folding Title: Advanced FolderFolding Points: 97791 Folding Title: Advanced FolderFolding Points: 97791 Folding Title: Advanced Folder
Time spent in forums: 3 Months 2 Weeks 2 Days 7 h 19 m 32 sec
Reputation Power: 699
is there something specific you need help with?
it seems pretty strait forward?
__________________
Look! Its a ShemZilla



Reply With Quote
  #3  
Old August 17th, 2006, 03:28 AM
X74SY X74SY is offline
Registered User
ASP Free Newbie (0 - 499 posts)
 
Join Date: Aug 2006
Posts: 5 X74SY User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 1 h 15 m 50 sec
Reputation Power: 0
Quote:
Originally Posted by nofriends
is there something specific you need help with?
it seems pretty strait forward?


I don't know what to do with the script to install it to my site.

Reply With Quote
  #4  
Old August 17th, 2006, 03:46 AM
nofriends's Avatar
nofriends nofriends is offline
Senior Water Wizard
ASP Free God 11th Plane (10000 - 10499 posts)
 
Join Date: Aug 2004
Location: Cape Town, RSA
Posts: 10,181 nofriends User rank is Brigadier General (60000 - 70000 Reputation Level)nofriends User rank is Brigadier General (60000 - 70000 Reputation Level)nofriends User rank is Brigadier General (60000 - 70000 Reputation Level)nofriends User rank is Brigadier General (60000 - 70000 Reputation Level)nofriends User rank is Brigadier General (60000 - 70000 Reputation Level)nofriends User rank is Brigadier General (60000 - 70000 Reputation Level)nofriends User rank is Brigadier General (60000 - 70000 Reputation Level)nofriends User rank is Brigadier General (60000 - 70000 Reputation Level)nofriends User rank is Brigadier General (60000 - 70000 Reputation Level)nofriends User rank is Brigadier General (60000 - 70000 Reputation Level)nofriends User rank is Brigadier General (60000 - 70000 Reputation Level)nofriends User rank is Brigadier General (60000 - 70000 Reputation Level)nofriends User rank is Brigadier General (60000 - 70000 Reputation Level)  Folding Points: 97791 Folding Title: Advanced FolderFolding Points: 97791 Folding Title: Advanced FolderFolding Points: 97791 Folding Title: Advanced FolderFolding Points: 97791 Folding Title: Advanced FolderFolding Points: 97791 Folding Title: Advanced Folder
Time spent in forums: 3 Months 2 Weeks 2 Days 7 h 19 m 32 sec
Reputation Power: 699
ok,
you need to create a table in your database:
tablename: user_log
columns: user_id, log_date, action_code, browser, ip_address

then you add this code to your global.asa in session_onstart
Code:
	'Update user database
	set conntemp=server.createobject("adodb.connection")
	cnpath="DBQ=" & server.mappath("/stevesmith/data/timesheet.mdb")
	conntemp.Open "DRIVER={Microsoft Access Driver (*.mdb)}; " & cnpath
	sqlString = "INSERT INTO user_log " & _
		" (user_id,log_date,action_code,browser,ip_address) " & _
		" VALUES ('Unknown',now,'L','" & _
		Request.ServerVariables("HTTP_USER_AGENT") & "','" & _
		Request.ServerVariables("REMOTE_HOST") & "')"
	Set logRS=conntemp.execute(sqlString)
	Set logRS=nothing

Include on any page whose hits you wish to track:
Code:
	'Update pagelog
	Dim hdrconntemp
	Dim hdrcnpath
	Dim hdrsqlString
	Dim hdrlogRS
	set hdrconntemp=server.createobject("adodb.connection")
	hdrcnpath="DBQ=" & server.mappath("/stevesmith/data/timesheet.mdb")
	hdrconntemp.Open "DRIVER={Microsoft Access Driver (*.mdb)}; " & hdrcnpath
	hdrsqlString = "INSERT INTO page_log " & _
		" (page,log_date,action_code,browser,ip_address) " & _
		" VALUES ('" & Request.ServerVariables("SCRIPT_NAME") & "',now,'L','" & _
		Request.ServerVariables("HTTP_USER_AGENT") & "','" & _
		Request.ServerVariables("REMOTE_HOST") & "')"
	Set hdrlogRS= hdrconntemp.execute(hdrsqlString)
	Set hdrlogRS=nothing

and then you just call the usage.asp page if you want to view
the stats.
just make sure to change the datasource to your database.

Reply With Quote
  #5  
Old August 17th, 2006, 04:51 AM
X74SY X74SY is offline
Registered User
ASP Free Newbie (0 - 499 posts)
 
Join Date: Aug 2006
Posts: 5 X74SY User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 1 h 15 m 50 sec
Reputation Power: 0
Thumbs up

Quote:
Originally Posted by nofriends
ok,
you need to create a table in your database:
tablename: user_log
columns: user_id, log_date, action_code, browser, ip_address

then you add this code to your global.asa in session_onstart
Code:
	'Update user database
	set conntemp=server.createobject("adodb.connection")
	cnpath="DBQ=" & server.mappath("/stevesmith/data/timesheet.mdb")
	conntemp.Open "DRIVER={Microsoft Access Driver (*.mdb)}; " & cnpath
	sqlString = "INSERT INTO user_log " & _
		" (user_id,log_date,action_code,browser,ip_address) " & _
		" VALUES ('Unknown',now,'L','" & _
		Request.ServerVariables("HTTP_USER_AGENT") & "','" & _
		Request.ServerVariables("REMOTE_HOST") & "')"
	Set logRS=conntemp.execute(sqlString)
	Set logRS=nothing

Include on any page whose hits you wish to track:
Code:
	'Update pagelog
	Dim hdrconntemp
	Dim hdrcnpath
	Dim hdrsqlString
	Dim hdrlogRS
	set hdrconntemp=server.createobject("adodb.connection")
	hdrcnpath="DBQ=" & server.mappath("/stevesmith/data/timesheet.mdb")
	hdrconntemp.Open "DRIVER={Microsoft Access Driver (*.mdb)}; " & hdrcnpath
	hdrsqlString = "INSERT INTO page_log " & _
		" (page,log_date,action_code,browser,ip_address) " & _
		" VALUES ('" & Request.ServerVariables("SCRIPT_NAME") & "',now,'L','" & _
		Request.ServerVariables("HTTP_USER_AGENT") & "','" & _
		Request.ServerVariables("REMOTE_HOST") & "')"
	Set hdrlogRS= hdrconntemp.execute(hdrsqlString)
	Set hdrlogRS=nothing

and then you just call the usage.asp page if you want to view
the stats.
just make sure to change the datasource to your database.


Thank you very much!

Reply With Quote
  #6  
Old August 17th, 2006, 04:58 AM
nofriends's Avatar
nofriends nofriends is offline
Senior Water Wizard
ASP Free God 11th Plane (10000 - 10499 posts)
 
Join Date: Aug 2004
Location: Cape Town, RSA
Posts: 10,181 nofriends User rank is Brigadier General (60000 - 70000 Reputation Level)nofriends User rank is Brigadier General (60000 - 70000 Reputation Level)nofriends User rank is Brigadier General (60000 - 70000 Reputation Level)nofriends User rank is Brigadier General (60000 - 70000 Reputation Level)nofriends User rank is Brigadier General (60000 - 70000 Reputation Level)nofriends User rank is Brigadier General (60000 - 70000 Reputation Level)nofriends User rank is Brigadier General (60000 - 70000 Reputation Level)nofriends User rank is Brigadier General (60000 - 70000 Reputation Level)nofriends User rank is Brigadier General (60000 - 70000 Reputation Level)nofriends User rank is Brigadier General (60000 - 70000 Reputation Level)nofriends User rank is Brigadier General (60000 - 70000 Reputation Level)nofriends User rank is Brigadier General (60000 - 70000 Reputation Level)nofriends User rank is Brigadier General (60000 - 70000 Reputation Level)  Folding Points: 97791 Folding Title: Advanced FolderFolding Points: 97791 Folding Title: Advanced FolderFolding Points: 97791 Folding Title: Advanced FolderFolding Points: 97791 Folding Title: Advanced FolderFolding Points: 97791 Folding Title: Advanced Folder
Time spent in forums: 3 Months 2 Weeks 2 Days 7 h 19 m 32 sec
Reputation Power: 699
no worries

Reply With Quote
  #7  
Old August 17th, 2006, 05:30 AM
X74SY X74SY is offline
Registered User
ASP Free Newbie (0 - 499 posts)
 
Join Date: Aug 2006
Posts: 5 X74SY User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 1 h 15 m 50 sec
Reputation Power: 0
I'm having a few problems

- Where can I find my global.asa ?

- I created the table w/ the 6 needed columns, am I doing it correctly? -Please See Screenshot-



- What do I need to edit here?

Code:
'Update user database
	set conntemp=server.createobject("adodb.connection")
	cnpath="DBQ=" & server.mappath("/stevesmith/data/timesheet.mdb")
	conntemp.Open "DRIVER={Microsoft Access Driver (*.mdb)}; " & cnpath
	sqlString = "INSERT INTO user_log " & _
		" (user_id,log_date,action_code,browser,ip_address) " & _
		" VALUES ('Unknown',now,'L','" & _
		Request.ServerVariables("HTTP_USER_AGENT") & "','" & _
		Request.ServerVariables("REMOTE_HOST") & "')"
	Set logRS=conntemp.execute(sqlString)
	Set logRS=nothing


&

Code:
'Update pagelog
	Dim hdrconntemp
	Dim hdrcnpath
	Dim hdrsqlString
	Dim hdrlogRS
	set hdrconntemp=server.createobject("adodb.connection")
	hdrcnpath="DBQ=" & server.mappath("/stevesmith/data/timesheet.mdb")
	hdrconntemp.Open "DRIVER={Microsoft Access Driver (*.mdb)}; " & hdrcnpath
	hdrsqlString = "INSERT INTO page_log " & _
		" (page,log_date,action_code,browser,ip_address) " & _
		" VALUES ('" & Request.ServerVariables("SCRIPT_NAME") & "',now,'L','" & _
		Request.ServerVariables("HTTP_USER_AGENT") & "','" & _
		Request.ServerVariables("REMOTE_HOST") & "')"
	Set hdrlogRS= hdrconntemp.execute(hdrsqlString)
	Set hdrlogRS=nothing


IE: /stevesmith/data/timesheet.mdb - what is a .mdb & what shall I need to change it to?

Any help would be very much appreciated,

Thanks!

Reply With Quote
  #8  
Old August 17th, 2006, 05:41 AM
nofriends's Avatar
nofriends nofriends is offline
Senior Water Wizard
ASP Free God 11th Plane (10000 - 10499 posts)
 
Join Date: Aug 2004
Location: Cape Town, RSA
Posts: 10,181 nofriends User rank is Brigadier General (60000 - 70000 Reputation Level)nofriends User rank is Brigadier General (60000 - 70000 Reputation Level)nofriends User rank is Brigadier General (60000 - 70000 Reputation Level)nofriends User rank is Brigadier General (60000 - 70000 Reputation Level)nofriends User rank is Brigadier General (60000 - 70000 Reputation Level)nofriends User rank is Brigadier General (60000 - 70000 Reputation Level)nofriends User rank is Brigadier General (60000 - 70000 Reputation Level)nofriends User rank is Brigadier General (60000 - 70000 Reputation Level)nofriends User rank is Brigadier General (60000 - 70000 Reputation Level)nofriends User rank is Brigadier General (60000 - 70000 Reputation Level)nofriends User rank is Brigadier General (60000 - 70000 Reputation Level)nofriends User rank is Brigadier General (60000 - 70000 Reputation Level)nofriends User rank is Brigadier General (60000 - 70000 Reputation Level)  Folding Points: 97791 Folding Title: Advanced FolderFolding Points: 97791 Folding Title: Advanced FolderFolding Points: 97791 Folding Title: Advanced FolderFolding Points: 97791 Folding Title: Advanced FolderFolding Points: 97791 Folding Title: Advanced Folder
Time spent in forums: 3 Months 2 Weeks 2 Days 7 h 19 m 32 sec
Reputation Power: 699
you are using a mySQL DB, so you will need to change the mdb (MS Access)
to mySQL, you can find a list of connections here:
http://www.connectionstrings.com
so instead of
Code:
	hdrcnpath="DBQ=" & server.mappath("/stevesmith/data/timesheet.mdb")
	hdrconntemp.Open "DRIVER={Microsoft Access Driver (*.mdb)}; " & hdrcnpath

you'll have
Code:
	hdrconntemp.Open "DRIVER={MySQL ODBC 3.51 Driver};SERVER=localhost;DATABASE=myDatabase;USER=  myUsername;PASSWORD=myPassword;OPTION=3;"

hope this helps

Reply With Quote
  #9  
Old August 17th, 2006, 08:39 PM
X74SY X74SY is offline
Registered User
ASP Free Newbie (0 - 499 posts)
 
Join Date: Aug 2006
Posts: 5 X74SY User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 1 h 15 m 50 sec
Reputation Power: 0
Thanks a lot for all your help nofriends! but I can't find my global.asa file on my root dir? I've checked all my folders but I can't find it anywhere!? Do I need to make the global.asa file myself?

Reply With Quote
  #10  
Old August 18th, 2006, 01:22 AM
nofriends's Avatar
nofriends nofriends is offline
Senior Water Wizard
ASP Free God 11th Plane (10000 - 10499 posts)
 
Join Date: Aug 2004
Location: Cape Town, RSA
Posts: 10,181 nofriends User rank is Brigadier General (60000 - 70000 Reputation Level)nofriends User rank is Brigadier General (60000 - 70000 Reputation Level)nofriends User rank is Brigadier General (60000 - 70000 Reputation Level)nofriends User rank is Brigadier General (60000 - 70000 Reputation Level)nofriends User rank is Brigadier General (60000 - 70000 Reputation Level)nofriends User rank is Brigadier General (60000 - 70000 Reputation Level)nofriends User rank is Brigadier General (60000 - 70000 Reputation Level)nofriends User rank is Brigadier General (60000 - 70000 Reputation Level)nofriends User rank is Brigadier General (60000 - 70000 Reputation Level)nofriends User rank is Brigadier General (60000 - 70000 Reputation Level)nofriends User rank is Brigadier General (60000 - 70000 Reputation Level)nofriends User rank is Brigadier General (60000 - 70000 Reputation Level)nofriends User rank is Brigadier General (60000 - 70000 Reputation Level)  Folding Points: 97791 Folding Title: Advanced FolderFolding Points: 97791 Folding Title: Advanced FolderFolding Points: 97791 Folding Title: Advanced FolderFolding Points: 97791 Folding Title: Advanced FolderFolding Points: 97791 Folding Title: Advanced Folder
Time spent in forums: 3 Months 2 Weeks 2 Days 7 h 19 m 32 sec
Reputation Power: 699
hi,
you can create your own one, have a look here
http://www.w3schools.com/asp/asp_globalasa.asp

Reply With Quote
Reply

Viewing: ASP Free ForumsOtherProgramming Help > I need this (ASP Application: Site Statistics) Installed on my website please help!


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 |