PRODUCTS · SPAIN · CONTACT · USEFUL INFO · FINANCIAL · SEARCH · COMPETITIONS · SITEMAP
Computer  · Manuals  · Telephone  · Webmaster  · Ebay  · Advert
Website Traffic · Google ranking · Resources · HTML
What is HTML  · Text & Formatting  · Use of Colour  · Working with images  · Hyperlinks  · Advanced  · CGI Access

Adding a counter
A web page hit counter provides an easy and effective way of keeping track of the number of people visiting your site. If you want a counter on your page you will need to insert the line of HTML shown below:

<img src="/cgi-bin/Count.cgi?ft=9|frgb=69;139;50|tr=0|trgb=0;0;0|wxh=15;20|md=6|dd=A|
st=5|sh=1|df=count.dat" align=absmiddle>


Note: The code above should be inserted all on one line or it may fail to work.

Within the line of HTML you have just inserted find df=count.dat and replace the count part with your username.

Example: If your username is jbloggs@freenetname.co.uk, then the text will read df=jbloggs.dat

Using forms
A popular feature of websites are online forms, these allow your visitors to send information back to you. freenetname provides a form to e-mail script that you can use called FormMail. The form will allow users to enter their details within various sections, then send the contents of the form to you. The contents of the form will be sent to your e-mail address. Below you will see the actual HTML code that is used to generate the form.

<form method="POST" action="http://www.users.freenetname.co.uk/cgi-bin/FormMail.pl" name="FeedBack_Form">
<input type="hidden" name="recipient" value="username@freenetname.co.uk">
<input type="hidden" name="sort" value="order:FirstName,Surname,emailaddress,Comments">
<center>
<table border="0" width="44%" bgcolor="#C0C0C0">
<tr>
<td width="40%" align="center"><b>First Name</b></td>
<td width="60%" align="center"><input type="text" name="FirstName" size="24"></td>
</tr><tr>
<td width="40%" align="center"><b>Surname</b></td>
<td width="60%" align="center"><input type="text" name="Surname" size="24"></td>
</tr><tr>
<td width="40%" align="center"><b>E-mail Address</b></td>
<td width="60%" align="center"><input type="text" name="emailaddress" size="24"></td>
</tr><tr>
<td width="40%" align="center" valign="top"><b>Comments on my webpage</b></td>
<td width="60%" align="center"><textarea rows="3" name="Comments" cols="24"></textarea></td>
</tr><tr>
<td width="40%"><div align="center"><center><p><input type="submit" value="Send Form" name="SendForm"></td>
<td width="60%" align="center"><div align="center"><center><p><input type="reset" value="Clear Form" name="ClearForm"></td>
</tr>
</table>
</center>
</form>

Next find the line:

<input type="hidden" name="recipient" value="username@freenetname.co.uk">

and replace the e-mail address held in the value= section with your own freenetname e-mail address.

Example: value="jbloggs@freenetname.co.uk"

Using the guestbook
The following scripts allow you to setup and maintain a customisable free guestbook. Three scripts are provided, two are used to allow users to add to and view your guestbook, the third allows you to maintain your own guestbook.

Script1 - addgb.pl
This script is used to add an entry to the guestbook. It is called from a form on one of your pages. The full path to the script is http://www.users.freenetname.co.uk/cgi-bin/guestbook/addgb.pl

This is an example form that you can insert into a webpage to call addgb.pl. Replace username with your freenetname username so that the script knows which guestbook is being added to.

<form action="http://www.users.freenetname.co.uk/cgi-bin/guestbook/addgb.pl" method="post">
<input type="hidden" name="user" value="username">
<table>
<tr>
<th align="right">From:</th>
<td><input type="text" name="from" size="20"></td>
</tr>
<tr>
<th align="right">URL:</th>
<td><input type="text" name="url" size="20" value="http://"></td>
</tr>
<tr>
<th align="right">Message:</th>
<td><textarea name="message" rows="5" cols="60" wrap="hard"></textarea></td>
</tr>
</table>
<input type="submit" name="Add Entry" value="Add Entry">
</form>
<hr>
<p align="center"><a href="http://www.users.freenetname.co.uk/cgi-bin/guestbook/viewgb.pl?user=username">View my guestbook</a></p>
<a href="http://www.freenetname.co.uk" target="_fnn"><img src="http://www.freenetname.co.uk/images/fnn_linkbutton.gif" width="148" height="65" border="0"></a>

Note: Although the layout of the form can be tailored to taste, the NAME="" and VALUE="" portions of the form should not be changed.

Script 2 - viewgb.pl
viewgb.pl is used to view your guestbook. Again, replace username with your username.

<a href="http://www.users.freenetname.co.uk/cgi-bin/guestbook/viewgb.pl?user=username">view guestbook</a>

After a new entry is added, addgb.pl will redirect to this URL automatically so that the guestbook can be viewed complete with the new entry.

Script 3 - maintaingb.pl
This script is used to maintain your guestbook. You must login with your normal freenetname username and password. Cookies must be enabled for this to work.

The maintenance page allows you to :

  • Specify that an e-mail should be sent every time a guestbook entry is made
  • Who the e-mail should be sent to (defaulting to your freenetname account)
  • The name of a template file. If a template file is not used then entries are viewed using a default layout. When the template file is used, you are free to format your page as you see fit. You must, however, add the comment <!--GUESTBOOK_DATA--> into the template file. This is replaced by the actual guestbook entries when the page is viewed.
  • Select messages to delete. The guestbook file is limited in size, when the size is exceeded new entries into the guestbook will not be accepted, rather the user attempting to post an entry will be informed that your guestbook is full.

To access the page, enter the following URL:

http://www.users.freenetname.co.uk/cgi-bin/guestbook/maintaingb.pl

This will prompt you to enter your freenetname username and password, before allowing entry into the maintenance page. The entry of your username can be bypassed by entering your username as part of the URL, thus:

http://www.users.freenetname.co.uk/cgi-bin/guestbook/maintaingb.pl?user=username

You still have to enter your password before being allowed access to maintain your guestbook data.

To use the template, create a page using your favourite HTML editor, and insert the comment tag <!--GUESTBOOK_DATA--> where you wish your guestbook entries to appear, as in the example below.

<html>
<head>
<title>My Guestbook</title>
</head>
<body>
<h1>My Guestbook</h1>
<p>Here is the list of my most recent guestbook comments</p>
<hr width="80%">
<!--GUESTBOOK_DATA-->
<hr width="80%">
</body>
</html>


 


You are here: Home-USEFUL INFO-Webmaster-HTML-CGI Access

Previous Topic: Advanced