Accu Web Hosting Accu Web Hosting Accuweb Hosting
Accu Web Hosting Accu Web Hosting Window Hosting Home Accu Web Hosting Window Hosting Accu Web Hosting PHP Hosting Accu Web Hosting Reseller Accu Web Hosting SQL Hosting Accu Web Hosting   accu web hosting
 

Go Back   Web Hosting Technical Support Discussion Forum > General Web Hosting Discussion Forum and Support > Windows Web Hosting Discussion Forum

Windows Web Hosting Discussion Forum Discussion Forum on Windows Web Hosting Related Support Issues. Discuss your Issues related to ASP.NET, MS SQL, ASP, DLL, Components, etc...

Reply
 
LinkBack Thread Tools
  #1 (permalink)  
Old 08-25-2005
Member
 
Join Date: Aug 2004
Posts: 65
Rep Power: 0
Vaughn is on a distinguished road
Send a message via MSN to Vaughn Send a message via Yahoo to Vaughn
Default

Here's an easy way to know the number of active visitors on your website at any given moment. To accomplish this, we are going to use traditional ASP.

Let's begin!

1) First of all, we will need to create a file that keeps the track of active users. For that, create a file called 'global.asa'.
2) Paste the following contents in it and save it:

Code:
<script LANGUAGE=VBScript RUNAT=Server>
Sub Application_OnStart
 Â* Â* Application("ActiveVisitors") = 0
End Sub

Sub Session_OnStart
 Â* Â* Application.Lock
 Â* Â* Application("ActiveVisitors") = Application("ActiveVisitors") + 1
 Â* Â* Application.Unlock
End Sub

Sub Session_OnEnd
 Â* Â* Application.Lock
 Â* Â* Application("ActiveVisitors") = Application("ActiveVisitors") - 1
 Â* Â* Application.Unlock
End Sub
</SCRIPT>
3) Upload this file to your webroot, typically it will be 'wwwroot'.
4) Okay, we're halfway there. Now we need to create a simple ASP file that will display the number.
5) Create an ASP file with any name, I'll use the name 'visitors.asp'.
7) Paste the following contents in it and save it:

Code:
<%@Language=VBScript%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
 Â* Â* <title>Active Visitors</title>
</head>

<body>
 Â* Â* <h3>Number of users visiting this site currently: <%=application("ActiveVisitors")%></h3>
</body>
</html>
8) Upload this file anywhere on your website.
9) You're done!

All you need to do now is to browse the 'visitors.asp' page and it will give the number of active visitors on your website!

Your feedback is welcome!
__________________
Vaughn
Team Leader // Tech. Support
AccuWebHosting.Com
email:support@accuwebhosting.com

Blog: blogsandbloggers.com/Vaughn
http://www.accuwebhosting.biz/Vaughn...aughn_Sign.jpg
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 06-30-2006
Senior Member
 
Join Date: May 2005
Location: (.)
Age: 25
Posts: 144
Rep Power: 0
Manuel_ is on a distinguished road
Send a message via MSN to Manuel_
Default

Wonderfull steps!!! Thanks again
__________________
Strat with Linux || Optimize, Secure and increase performance of Apache || Already Started
The visionary conceives the impossible, The missionary makes it possible. ...Gita.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools

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

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
FREE Website Submission Gus Free Submission to Search Engines 0 02-08-2007 07:16 PM
Website admin newbie/dummy with questions wrinehart Windows Web Hosting Discussion Forum 3 07-18-2006 01:09 AM
How to setup your website from scratch including domain registration and hosting account? Manuel_ Presales Questions - Windows Web Hosting - Shared Account 0 06-14-2006 04:12 PM
help in setting up website Jason Windows Web Hosting Discussion Forum 0 01-18-2006 01:39 AM
How do you host your website? karesz70 Presales Questions - Windows Web Hosting - Shared Account 1 01-09-2006 06:47 AM


All times are GMT -5. The time now is 09:08 PM.


Powered by vBulletin® Version 3.7.0
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.2.0 RC5
http://www.accuwebhosting.com/terms.htm

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31