A NEW COUNTER FOR THE MASSES =P

CONTENTS:

  1. Overview
  2. Live Demo
  3. Applet Setup & Parameters Infos
  4. Common errors
  5. Greets & stuff =P

OVERVIEW

FLWCounter v1.0

©2001 !FLWright! - http://flwright.cjb.net

Well, first of all a note: this applet is LINKWARE, so it's free and I'm not asking u a single buck for it; but if you like it and you want to use it, I only ask you to keep the original gFX with my site name, or just add a link to my site in your links section, and I'll be so damn happy for this ;P

Now, the background story: I needed a counter for my site, but I was tired of discontinued services from the free servers... So, I looked for one on some web resources site, but all I found was not useful for me: the ASP ones needed the .asp extension for all the pages, even the static HTML ones, while the Java based counters needed to sign up for a service on some server,and, last but not least, I could not find any customizable gFX counter...

Ok, I needed it, so I coded a working counter =) What's different from all the other counters? It's easy: it's an applet, so it may be included in any HTML page; it's customizable, so you decide the size, the background gFX, the font properties and so on; it includes the ASP code to generate the number of hits, so you won't complain about discontinued services at all, and you will be able to modify it to fit your needs...

LIVE DEMO

Clicking on the 'Test the counter' button you'll open a popup window which will show you two different implementations of the counter: I swear, the code is the same, you only have to change the applet parameters to obtain such a different result ;P

To make the ASP code for the hits generation work, tho', you'll have to do the following things:

  1. Move the whole unzipped dir to a working ASP site on your personal server or on a host somewhere in the world ;P
  2. Write down the absolute HTTP URL of the directory in the box below, e.g. "http://myhost.com/~myusername/flwcounter"
  3. Click the 'Test the counter' button and enjoy =)

If you did not do what I suggested, you may get an 'inv URL' (invalid URL) or a 'con err' (connection error) message instead of the number of hits, and you won't be able to test the whole functionalities of the counter...

Now it's time to take a look at the trick =)

Write down the absolute HTTP URL of the unzipped directory of the counter (e.g. "http://myhost.com/~myusername/flwcounter" - no double quotes -):

 

APPLET SETUP & PARAMETERS INFOS

To set the applet up, you'll need to move the FLWCounter.class, the FLWCounter.mdb and the FLWCounter.asp files to their final locations; now, update the FLWCounter.asp file writing down the RELATIVE path of the .mdb database referred to the location of the .asp file. e.g., if the ASP file is located at "http://myserver.com/scripts/FLWCounter.asp" and the database is at "http://myserver.com/database/FLWCounter.mdb" you will have to update the .asp file like this:

<%
'--- Just edit the following variable to tune up your counter =)

Public dBLocation
dBLocation = "../database" <- relative location of the directory where the .mdb database is stored

[...]

Ok, the basic setup is done; now, just insert the counter applet in your HTML code as all the other applets:

<applet code="FLWCounter.class" CODEBASE="[...]" width="[...]" height="[...]">
<param name="[...]" value="[...]">
</applet>

This is the list of all the available parameters:

PARAMETER DEFAULT VALUE DESCRIPTION
ASPCodeLocation none The absolute URL of the directory where the FLWCounter.asp file is located (like "http://myhost.com/~myaccount/scripts"); THIS PARAMETER IS REQUIRED and it MUST contain an ABSOLUTE, VALID URL, else the counter will show an error code instead of the number of visitors
Image flw.gif It's the filename of the background image; it may include a relative path too, like "../images/flw.jpg"
FontSize 10 It's the size (in points) of the font used to show the number of visits
Bold true If it's 'true', the font used to show the number of visits is bold; if it's 'false' the font is plain
RedComponent 0 The red component of the color of the font used to show the number of visits (0-255)
GreenComponent 0 The green component of the color of the font used to show the number of visits (0-255)
BlueComponent 0 The blue component of the color of the font used to show the number of visits (0-255)
MidPointX 44 It's the X coord of the mid point of the baseline of the text used to show the number of visits; this value is relative to the left side of the applet itself and it represents the center of the displayed text
BaseLineY 12 It's the Y coord of the baseline of the text used to show the number of visits; this value is relative to the upper side of the applet itself
Output unique If it's 'unique', the ASP code will return the number of unique visitors of your site; if it's 'all', the counter will show the number of all the page hits your site received

 

COMMON ERRORS

Using this applet, you may encounter some errors; here I reported the most common ones:

If you will get different errors, please report 'em to me

GREETS & STUFF =P

This is the section I prefer ;P

First of all, if you got this applet somewhere on the Web, just don't forget to take a look at my site =)

And now, the greets (in no particular order =P): all my uCF and pHROZENcREW l33t fellows, in particular Quantico, hasher, MackT, Avl!s, night_mastah, t00nie, EinZtein, SampleX, E_O_D, noos, posey, XspyderX, Athol, NUKEM, oVeRFLoW, dbCooper, aDancer, Weazel, rudeboy, TUC, SaVaGe, Predator, Nitallica and DaVinci; all the TMG members, in particular StatMan and tHEeGOISTE; all the #cracking4newbies and #win32asm guys, in particular Iczelion, hutch, Ates, CrackZ, neural_noise, torn@do, flaket, innuendo, defiler, ultraschall, drgn, JosephCo, Carpathia, TRDonJuan... and all the ppl I forgot for sure =P