Learn how to use global.asa to display thenumber of users visiting your site. This tutorial can be broken downinto two sections, global.asa, and numvis.asp. Before you can beginthis tutorial, make sure your host supports global.asa.GLOBAL.ASA
Global.asa is defined as an optional file that defines functions,variables, and methods that are accessible by every ASP page within theapplication.The global.asa file is often used to define and proccesssession-specific variables, which is its function in this tutorial.Global.asa can not be written in ASP, so no <% %> tags in thisfile, here's the file:
<script language="vbscript" runat="server">Sub Application_OnStartApplication("numvis")=0End SubSub Session_OnStartApplication.LockApplication("numvis")=Application("numvis") + 1Application.UnLockEnd SubSub Session_OnEndApplication.LockApplication("numvis")=Application("numvis") - 1Application.UnLockEnd Sub</script> |
NUMVIS.ASP
This file will display the number of visitors online like so:
<html><head><title>Spoono Rocks!</title></head><body>There are <%response.write(Application("numvis"))%>online now!</body></html> |
Related Articles
- Page Navigation & Online Users & ChmodMany people have asked me how i got index2.php?page=link
Basically what happens, is where ever the folllowing code is put on your main php page, is where the the page link.php will go. - Users OnlineFirst Run this SQL In your MYSQL database..
- Blog and PodcastPodcasts and Weblogs were considered long time as niche medium. Two current studies show that the trends are further common at least in the USA as so far assumed.
- All about SEO or SFO?First lets start with definitions:
SEO: Search Engine Optimization, SFO: Search Friendly Optimization.
These two things are what most webmasters have trouble balancing. These things seem to always be on opposite ends. On one hand you have to make sure search engines can crawll your website.... - Should Your Join a Social Networking Website or Not?Social networking is defined as the grouping of individuals together into to specific groups, often like a small community or a neighborhood...
- Top Website Navigation TipsThe aim of a websites navigation is simply to allow users to get to the content they require. For sites that have a large number of sections and web pages (and information sites can be one of these) the navigation plan has to be properly researched and designed.
- What is Pay-Per-Click (PPC) Marketing?Once your company has a professionally developed and functional web site, receiving web traffic becomes the next goal. There are many internet marketing techniques available today; Pay-Per-Click (PPC) Marketing is one of the quickest ways to begin an internet marketing campaign.
- The Evolution Of Search Engine MarketingThe world of search engine marketing (SEM) is in constant evolution. With increased numbers of search engines, and evolution in the techniques and technologies used, SEM is becoming a tool industries cannot afford to do without.
- Detect a Users LanguageShow something like Language: *Your Language*
- Ten Fatal Mistakes That Make Web Sites StinkSince youll spend lots of time and money to create your web site, dont you want to make sure youre not making mistakes that at best irritate users, and at worst make you lose customers? After all, when you alienate users, you lose potential revenue. Who can afford that?
