<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>WiseCodes &#187; ASP</title>
	<atom:link href="http://www.wisecodes.com/category/asp/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.wisecodes.com</link>
	<description>Bringing You The Power of Code !!</description>
	<lastBuildDate>Wed, 01 Sep 2010 19:33:53 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>ASP: Online Users Counter</title>
		<link>http://www.wisecodes.com/2009/08/asp-online-users-counter/</link>
		<comments>http://www.wisecodes.com/2009/08/asp-online-users-counter/#comments</comments>
		<pubDate>Mon, 10 Aug 2009 18:16:05 +0000</pubDate>
		<dc:creator>Venu Thomas</dc:creator>
				<category><![CDATA[ASP]]></category>
		<category><![CDATA[OpenSource]]></category>
		<category><![CDATA[VBScript]]></category>

		<guid isPermaLink="false">http://www.wisecodes.com/?p=748</guid>
		<description><![CDATA[This popular script is found in almost all sites in ASP, used to count visitors assets (present at the time), is on our website. The code should be used in the file Global.asa. Must not be enclosed in must be unique and that has within it. (Well, not unique, but playing with Global.asa not recommend [...]]]></description>
			<content:encoded><![CDATA[<p>This popular script is found in almost all sites in ASP, used to count visitors assets (present at the time), is on our website. </p>
<p>The code should be used in the file Global.asa. Must not be enclosed in <% and%> must be unique and that has within it. (Well, not unique, but playing with Global.asa not recommend it). </p>
<p>Here&#8217;s the code that goes into the Global.asa </p>
<pre class="brush: xml;">
&lt;script language=vbscript runat=server&gt; 

Sub Application_OnStart
Application(&quot;Active&quot;) = 0
End Sub 

Sub Application_OnEnd
End Sub 

Sub Session_OnStart
Application.Lock
Application(&quot;Active&quot;) = Application(&quot;Active&quot;) + 1
Application.Unlock
End Sub 

Sub Session_OnEnd
Application.Lock
Application(&quot;Active&quot;) = Application(&quot;Active&quot;) - 1
Application.Unlock
End Sub 

&lt;/script&gt;
</pre>
<p>And to show the information which the Global.asa, or to show active users as I did in my example, they should put the following on the page displaying the data: </p>
<pre class="brush: xml;">
&lt;P&gt;There are currently &lt;%=Application(&quot;Active&quot;)%&gt; user's on our site&lt;/P&gt;
</pre>
<p>Happy Programming!!! <img src='http://www.wisecodes.com/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
<p class="facebook"><a href="http://www.facebook.com/share.php?u=http://www.wisecodes.com/2009/08/asp-online-users-counter/" target="_blank"><img src="http://www.wisecodes.com/wp-content/plugins/add-to-facebook-plugin/facebook_share_icon.gif" alt="Share on Facebook" title="Share on Facebook" /></a><a href="http://www.facebook.com/share.php?u=http://www.wisecodes.com/2009/08/asp-online-users-counter/" target="_blank" title="Share on Facebook">Share on Facebook</a></p>]]></content:encoded>
			<wfw:commentRss>http://www.wisecodes.com/2009/08/asp-online-users-counter/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

