NetCloak Demo


 

Insert Overview

We will begin with INSERT commands because they are the simplest NetCloak commands to learn. These are the easiest way to get started using NetCloak on your site.

All NetCloak commands begin with an opening angle bracket ("<"), just like HTML tags. Commands are closed with a closing angle bracket (">"). The NetCloak command name always immediately follows the opening bracket. Command names are not case sensitive, but are generally written in all uppercase by convention to make them easier to recognize in HTML pages.

For example, to add the current time and date to your page, use this line:

    It is <INSERT_TIME> on <INSERT_DATE>.

The NetCloak command is what you will put into the HTML source of the page. When the page is served, NetCloak will process the page and replace the command with the current date. Note that this happens entirely on the server- the NetCloak command is never sent, and the browser only receives text and standard HTML tags.

NetCloak INSERT commands all display or insert a piece of information from the server into the page in place of the command. For example, the sample above will appear in a user's web browser like this:

    It is 09:57 on 01/31/2025.

Similar commands allow you to dynamically display the time, counters, the user's name and other information about the client, page or server.

Many NetCloak commands have required or optional additional parameters. In other words, additional settings that specify differences in how the information displayed by the INSERT command should be shown. Parameters must be specified in order, according to the command description in the User's Guide, and are separated by one or more spaces.

For example, the <INSERT_DATE> command offers two optional parameters, one for a time offset and one for the desired format. The offset allows you to specify a number of hours difference between the actual date and what is displayed. The format parameter allows you to override the default display format and display the date as either a short date or long date. For example, to show tomorrow's date as a short format, you would write:

    <INSERT_DATE +24 SHORT>

On a web page, users will see this:   02/01/2025

What is noteworthy now is that parameters can be added after the command name, are separated by spaces, and are inside the angle brackets around the command. Parameters for each command are something you will learn later as you start using more NetCloak commands. The details about how particular parameters work is detailed in the Commands section of the Reference Guide.

More INSERT Commands

There are many different INSERT commands, dealing with date and time, counters, file information, and more. We will cover a few here to get you acquainted with the range of commands.

Countdown

NetCloak also has a unique command which will insert the amount of time remaining until or elapsed since a specified date and time. We have all probably seen enough of these now that the new millenium has started. The <INSERT_COUNTDOWN> command, though, is still plenty useful. For example:

Our plant has worked 9147 days without a lost time accident!

You can use this command to count down the time until a holiday, meeting or other future event as well as counting time elapsed since a past one. The <INSERT_COUNTDOWN> command has options to display the time period in minutes, hours, days, weeks or any combination of those units.

Counters

One of NetCloak's simplest and most useful insert commands is <INSERT_COUNT>. This command, as you would expect, inserts a counter into the page that is incremented every time the page is served.

The counter will look like this:   1237  
(reload the page to see the counter increase)

You can create any number of counters simply by giving each one a unique name. By naming your counters you can have a separate counter for different pages, or refer to the same counter on more than one page.

A complete list of INSERT (and other) commands is in the NetCloak User's Guide. We will leave it to you to discover and learn the rest of the INSERT commands.

Create A Cloaked Page

You are now ready to create a cloaked page. First, we'll create a simple page from scratch, to show just how straightforward "cloaking" is.

  1. Open a text editor, preferably BBEdit or SimpleText.

  2. Create a new document, and enter exactly one line:
        Accessed <INSERT_COUNT> times.
    

  3. Save the file in your Web server root folder as "test.nclk".

  4. Go back to your Web browser, open a new window, and access the URL:

    http://www.yourserver.com/test.nclk

    Of course, you must replace "www.yourserver.com" with the name or IP address of your Web server.

The browser should display the line as "Accessed 1 times." If you reload the page, the counter should increment automatically.

That's it! You've created your first cloaked page.

You can now start using NetCloak INSERT commands in pages on your Web site. Remember that NetCloak commands will only work in pages processed by NetCloak. All files with names ending in .nclk are automatically cloaked, so for the moment you can only use these commands in pages with the .nclk suffix. While you are just evaluating the NetCloak demonstration version, we recommend that you name or re-name pages with the suffix ".nclk" when you use NetCloak commands in them.

Once you have decided to purchase NetCloak, though, we recommend that you change the .html suffix mapping so that every page of your Web server is cloaked. With all .html files cloaked, you will be able to use NetCloak commands anywhere on your site as needed. For details, see the Installing NetCloak section of the User's Guide.


NetCloak Tip: If you ever have problems with commands not working as expected, try using TagBuilder to add the commands to your page. By using TagBuilder, the text of the command will be dropped into your page for you, avoiding possible syntax mistakes and typos. It also provides a handy list of available commands which is ideal when you are learning to use NetCloak.

If you are using BBEdit or Dreamweaver, you can also use special extensions for creating NetCloak commands in your pages with these editors.


[ Move On To The Next Tutorial | Return To The NetCloak Introduction ]