Welcome to Islandnet.com  
Locally owned and operated since 1993  
Live Help
LOG IN:  Username:    Password:    

ReflectIt

Synopsis

This gadget is used to reflect (or redirect) a web browser to another URL, optionally incrementing a counter in the process. This is useful for creating pull-down URL lists, or placing advertisements on your web pages (ie: you can report on how many times the ad has actually been clicked on).


Setup

At a minimum, this gadget requires only one parameter: the URL that it should redirect to. For example, the following form will take you to Island Net's main homepage when you click on the button:

<form method=post action=/cgi-bin/reflectit>
<input type=hidden name=url value="http://www.islandnet.com/">
<input type=submit value=" Go to Islandnet ">
</form>
Note that there are no visible input fields. This form will display only a button:

Another way to do the same thing is to use an anchor tag, like this:

<a href=/cgi-bin/reflectit?url=http://www.islandnet.com/>
Go to Islandnet</a>
Which would look like this: Go to Islandnet.

By providing a pull-down menu of URL's, you can save a lot of space on a web page. Here's how it's done:

<form method=post action=/cgi-bin/reflectit>
<select name=url>
<option value=http://www.islandnet.com/>Islandnet's Homepage
<option value=http://www.islandnet.com/about.html>About Islandnet
.
.
</select>
<input type=submit value="Go">
</form>

And it would look like:


Counting Clicks

In addition to reflecting browsers to another URL, this gadget has the ability to increment a counter each time it is used. Only two additional items are required to enable this:

<input type=hidden name=login value=YOURLOGIN>
<input type=hidden name=file value=FILENAME>
Simply replace YOURLOGIN with your Islandnet login name (you cannot use an email alias here), and replace FILENAME with the name of the file that is to contain the counter values.

Note that FILENAME is relative to your root directory, not your "www" directory. This allows you to keep your count values private from web browsers. Also note that no matter what filename you specify, an extension of ".ctr" will be added.

You can use a different file for each different URL, or use the same one. The counter file can keep track of any number of URLs and count values.

Here's how you would specify those values in the second example above:

<a href=/cgi-bin/reflectit?url=http://www.islandnet.com/
&login=YOURLOGIN&file=FILENAME>
Go to Islandnet</a>

Counter Files

The format of a counter (.ctr) file is simple. They are plain text files with one count value per line. The count value consists of a keyword, followed by a tab character, followed by the count number itself.

By default the keyword used is the URL value, but occasionally you may want completely different URL's to increment the same counter value. If you happen to define the html parameter "key", then its value will be used instead of the URL itself:

<input type=hidden name=key value=KEYWORD>


Page generation time: 0.06 seconds