Programming Tutorials Browser Tutorials Articles Struts Tutorials Hibernate Tutorials

Search: 

  Tutorial: Perl and CGI Counters Adding an Access Counter Tutorial

CGI programs can make your Web pages dynamic, and one popular application of CGI is the addition of an access counter. An access counter is a text or graphical representation of the number of times that your Web page has been requested. Access counters wo

Tutorial Details:

Access Counter

Adding an Access Counter CGI programs can make your Web pages dynamic, and one popular application of CGI is the addition of an access counter. An access counter is a text or graphical representation of the number of times that your Web page has been requested. Access counters work either by including a CGI script within an HTML page with Server Side Includes or the tag, or by generating the entire HTML page from a CGI script. When a user requests the HTML page containing an access counter, the CGI script checks the current access count, increments it by one, and displays the results in the Web page. Many Web sites have added access counters to their home pages. Figure 1 displays some ways that access counters can be displayed.

Figure 1: Acccess counters
As shown in the figure, access counters can be displayed as text or as an image file representing the value of the counter. As you might imagine, the graphical version requires more work in the CGI script than simply displaying the value of the counter as text. To display the graphic, you must either have a graphic file for every possible number the counter can reach or you must construct the graphical image from several image files. If you use the latter method, you only need to store 10 files, one for each digit 0 through 9. Then, when necessary, your CGI script creates the image file by putting together the separate GIF graphic files into a single GIF that the browser displays. For example, when the access counter is at 986, the CGI script takes the individual GIF files of the digits 9, 8, and 6 and combines them into one GIF that is the combination of all three. GIF image files are just one of many image file formats. Two other types of image file types that you can work with are JPEG and XBM images, because many Web browsers can display them. However, this article uses GIF image files, as you'll see in the section "A Graphical Access Counter" later in this article.
This article starts with an example text access counter. You should read this section even if you want to create a graphical access counter, because the basic functionality of the two types of counters is the same. The second half of the article explains how to create a graphical access counter. In this case, the process is a bit more challenging, but the results are a lot more impressive.


 

Read Tutorial at: Click here to view the tutorial

Rate Tutorial:
Perl and CGI Counters Adding an Access Counter Tutorial

View Tutorial:
Perl and CGI Counters Adding an Access Counter Tutorial

Related Tutorials:

Displaying 1 - 50 of about 1568 Related Tutorials.

PERL & CGI Programmer
PERL CGI Programmer PERL & CGI Programmer...;  Position Vacant: PERL & CGI Programmer Job Description  Looking for CGI programmers having knowledge of Perl
 
Perl Programming Books
;      Perl Tutorial Books... for Picking Up Perl. Picking Up Perl is a freely redistributable tutorial book...; CGI Programming With Perl CGI programming offers you
 
JSP Session Counter Using SessionListener
JSP Session Counter JSP Session Counter Using...;        Counter is a device which... that in general there is two types of counters, first is up counters which
 
JSP Session Counter Using SessionListener
JSP Session Counter JSP Session Counter Using...;        Counter is a device which... that in general there is two types of counters, first is up counters which
 
Beginners Java Tutorial
java Beginner,java Beginners,Beginning java,Beginners Java Tutorial,Java for beginners Beginners Java Tutorial...; This tutorial will introduce you with the Java Programming
 
Adding an Attribute in DOM Document
Adding an Attribute in DOM Document, XML,XML Tutorials,Online XML Tutorial,XML Help Tutorials Adding an Attribute in DOM Document.... There are some of the methods used in code given below for adding attribute
 
Beginners Java Tutorial
java Beginner,java Beginners,Beginning java,Beginners Java Tutorial,Java for beginners Beginners Java Tutorial...; This tutorial will introduce you with the Java Programming
 
Adding a New Column Name in Database Table
New Column,Add New Column in MySQL,Add New Column in MySQL,Adding a New Column Name in Database Table Adding a New Column Name...;    In this jdbc tutorial program we are going
 
Java Java DOM Tutorial Tutorial
XML,XML Tutorials,XML Examples,XML Example,Java DOM Tutorial Java DOM Tutorial        ...;      This tutorial is complete guide to DOM
 
Perl Developer
Perl Developer Perl Developer...; Position Vacant: Perl Developer Job Description  We are looking for Perl developers to work on various projects. 
 
Beginners Stuts tutorial.
Architects in Enterprise level, favour the Struts Framework .In this  tutorial... of Struts Tutorial ,  Ted Husted, had to admit that the Struts naming...', it could have been called 'Controller' . Adding 'action' to everything
 
Access the User's node and Retrieve the Preference Information in Class
java preferences,Access the User's node and Retrieve the Preference... to access the user's node and retrieve the stored information in the class. Here we... in preferences. In this section you will see about the way of the access user's preference
 
Struts 2 Tutorial
Programming Tutorials Struts 2 Tutorial  ... Struts 2 Tutorial and Online free training helps you learn new elegant Struts 2...; Adding Validation to Struts 2 Login Application In this section we
 
Building a Simple EJB Application ?A Tutorial
Building a Simple EJB Application ?A Tutorial Building a Simple EJB Application ?A Tutorial     ... workflow application)  Introduction In this tutorial we will create
 
Jdbc access database
Jdbc access database Jdbc access database... connections.  Understand with Example In this Tutorial we want to describe you a code that helps in understanding JDBC access database. The code illustrates
 
Unix and Perl Programmer
Unix and Perl Programmer Unix and Perl Programmer...;  Position Vacant: Unix and Perl Programmer  Job Description  We are looking for Perl Programmers with Unix
 
Using Bean Counter in JSP
Using Bean Counter in JSP Using Bean Counter in JSP...;   In this section you will learn how the counter bean can be used in jsp. As you all know a counter increments the value by one. Here, we
 
Eclipse Perl Integration
Eclipse Plugin-Language Eclipse Perl Integration...;   EPIC is an open source Perl IDE based on the Eclipse... assist, perldoc support, source formatter, templating support and a Perl
 
Java DOM Tutorial
XML,XML Tutorials,XML Examples,XML Example,Java DOM Tutorial Java DOM Tutorial        ...;      This tutorial is complete guide to DOM
 
Simple Counter In Servlet
Servlets Counter Example,Simple Counter in Java Servlet,Free Counter Example Using Java Servlet Simple Counter in Servlet... on counter which will keep track how many times the servlet has been accessed. 
 
OOP Tutorial [first draft]
Java: OOP Tutorial Java: OOP Tutorial [first draft] Table of contents Introduction... for a student. Follow the tutorial and you'll see how this can be improved
 
Struts 2 Tutorials for Beginners, Struts 2 Tutorial
Programming Tutorials Struts 2 Tutorial  ... Struts 2 Tutorial and Online free training helps you learn new elegant Struts 2...; Adding Validation to Struts 2 Login Application In this section we
 
Open Source Databases
as a preliminary Perl implementation, this is the best iteration of OSDB yet... usage of Microsoft's SQL Server and Access databases increased 6 percent... direct access to system and network resources.? .Net performs the same function
 
JSP PDF books
(CGI) programming. They are programs that run on a Web server, acting... operating system or Web server and that JSP gives you full access to servlet
 
Advantages of Servlets over CGI
Advantages of Servlets over CGI - Benefits of Servlet Programs over CGI Advantages of Servlets over CGI   ... applications for server side. Earlier CGI was developed to provide server side
 
Rico Tutorial
Rico Tutorial Rico Tutorial               ... JavaScript object , AjaxEngine , for adding HTML page .The Rico it is also responded
 
GUI Tutorial I - FIRST DRAFT
Vanilla Java: GUI Tutorial First Draft Table of Contents GUI Tutorial I - FIRST DRAFT Table... after reading this tutorial. The tutorial presents model programs of increasing
 
Java Building a Simple Web Service ? A Tutorial Tutorial
Building a Simple Web Service ? A Tutorial Building a Simple Web Service ? A Tutorial...;    Introduction In this tutorial we will create a simple web
 
MySQL Tutorial - SQL Tutorials
MySQL Tutorial,Free MySQL Tutorials,MySQL Programming Tutorials,Online MySQL Help for Beginners MySQL Tutorial - SQL Tutorials...;  Complete MySQL 5 Tutorial In this section you
 
Using Protected Access in JSP
Using Protected Access in JSP Using Protected Access in JSP         ... of access specifiers: public, protected, private. We always declare access specifiers
 
Unix Web Hosting
Hosting provides Perl programming, PHP programming and MySQL & PostgreSQL....  SSH - Secure Shell  SSH enables the access the remote computer securely..., without having to serve the entire page via a CGI program, or other dynamic
 
The CodeGenClipse project
platform (v3.1.2 and v3.2) and the Java (v1.5+) by adding IDE support for code... . However this syntax can be used with multiple languages, including Java, Perl... update manager. Finally, to get the source, use anonymous access with the subversion
 
Adding slash "\" character before quote "'" in a query
Adding slash "\" character before quote "'" in a query Adding slash "\" character before quote "'" in a query  During the inserting the records in the database if user enters the phrases
 
JSTL: Property Access
JSTL: Property Access  JSTL: Property Access          ... access the property by using  the dot(.) and [ ] operator.  Firstly we
 
Access Modifier
Access Modifier Access Modifier                          
 
A Holistic counter in Servlet
A Holistic counter in Servlet A Holistic counter... class named as HolisticCounterInServlet. Now declare a variable counter of int with initial value 0, the value of this counter will be different for each servlet
 
Adding a Rollover and Pressed Icon to a JButton Component in Java
Image Rollover,Change Image on Mouse Rollover or Click,Create Image Rollover Using Java Swing Adding a Rollover and Pressed Icon... adding event i.e. the rollover and click icon to a JButton component of swing
 
Counter in Init() Method
Counter in Init() Method Counter in Init() Method... takes one argument of ServletConfig. Firstly declare a variable counter which will have the initial value of the counter. The init() method accepts an object which
 
JavaScript Array Access
JavaScript Array Access JavaScript Array Access...;   In this section, you will study how to access the array... to refer the name of the array and the index number. Then, it will access
 
Hit Counter Servlet Example
Hit Counter Servlet Example Hit Counter Servlet... then session is created and value of the counter will be zero and after again accessing of servlet  the counter value will be increased by one. In this program
 
Rationale for GUI tutorial decisions
Java: Rationale for GUI tutorial decisions Table of Contents Rationale for GUI tutorial decisions Java... course, and adding something means removing something else. So what
 
Using a Random Access File in Java
Java Random Access File,Random Access File in Java,Using Random Access File Using a Random Access File ... for both reading and writing files A random access file treats with a large array
 
Developing Distributed application using Enterprise Java Beans, J2EE Architecture, EJB Tutorial, WebLogic Tutorial.
Architecture, EJB Tutorial, WebLogic Tutorial.... Problem of installing and upgrading data access software... the java programs to access the database. For more information
 
Learn Java Quickly, Quick Java Tutorial
with same name as the public class just adding the extension ?.java? . Here
 
Add RenderingHints to a Graphics
; This Java tutorial teaches you about adding the rendering hints to a graphics
 
Threading in Java
within a program. And each thread has its own local variables, program counter... them and intercommunicate to each other. Lock term refers to the access granted to a particular thread that can access the shared resources. Inter-Thread
 
JDBC, JDBC Tutorial, JDBC Tutorials
to manipulate data stored into the database. Here is the complete tutorial on JDBC... programming interface that allows the Java programmers to access database...;    Features of JDBC 3.0 In this tutorial we will you
 
JDBC - Java Database Connectivity Tutorial
to manipulate data stored into the database. Here is the complete tutorial on JDBC... programming interface that allows the Java programmers to access database...;    Features of JDBC 3.0 In this tutorial we will you
 
Apache Geronimo Application server Tutorial
are supported through JACC 1.0 api. JACC supports LDAP (Lightweight Directory Access...://java.sun.com/j2ee/1.4/docs/tutorial/doc/index.html Install ant. Ant is very
 
Adding time span example
Adding time span example Adding time span example          ... 12:00 Adding 2 Months After Addition date is: 10-December-2008
 
Site navigation
 

 

Send your comments, Suggestions or Queries regarding this site at roseindia_net@yahoo.com.

Copyright © 2006. All rights reserved.