About usContact usSite help
Quick links
Search this site

Running CGI-BIN Scripts

 

Can I run my own scripts?

No, you can only use the scripts we have pre-installed for you. If you wish to run your own scripts, please upgrade to the commercial web service via your control panel.

Back to the top

What scripts are supplied?

count
A counter which is incremented every time it is run. It is generally used to provide a number of visitors item. Only one counter is allowed.

imagemap
Allows areas of a single image to be defined as clickable in, for example, graphical menus. Any number of imagemaps can be added. Processing takes place on our server, not the visitor's computer.

mailform
Provides a single form using the GET method which is then emailed to the fixed address webmaster@hostname.demon.co.uk . Please note that it is the user's responsibility, as the administrator of their own Demon host, to make sure that mail addressed to the webmaster is accepted by their system (Turnpike will deliver webmaster mail to the default mailbox).

testform
As mailform, but displays the data instead of mailing it. Used for debugging.

Please note that the names of these scripts must be in lower case.

Back to the top

Can I use scripts on other sites?

You can call scripts located on other servers, but always ensure that you have permission to use the facilities before including links to them in your pages.

Back to the top

How do I use forms?

Forms are supported on the Homepages server using the ' GET ' method, which limits the amount of information that may be sent. All the information that is sent from a form on your page will automatically be emailed to a user called webmaster on your computer. This means that if your host name is sample , data that people enter into your web pages will be sent to webmaster@sample.demon.co.uk

To create a form that will be mailed to you, include the following line in your web page:

<form action="/cgi-bin/mailform" method="get">

Then fill in your form buttons, textboxes and text areas. Remember to finish the form with the </form> tag. To find more information regarding the writing of the form into your page, see our tutorials and libraries .

Back to the top

How do I test my forms?

If you change the form statement in your webpage to read like this:

<form action="/cgi-bin/testform" method="get">

The data entered into your form will be displayed in your web browser, in exactly the same format as the e-mail message that would have been sent if you used the mailform script.

Back to the top

How do I use image-maps?

An image map is a graphic on a page that contains clickable 'hot spots'. Depending on where you click on the image, your browser is sent to a different page. The image map consists of two parts:

  1. The actual graphical image file
  2. A text file containing the coordinates of hot spots on the image. This known as the map file.

The image map facility uses the map file to tell it which areas of your picture are hot spots. The Homepages server uses maps in the NCSA format , so if you have a programme that creates maps, you should make sure they are in NCSA format and not the CERN format.

Windows and X evaluation versions of mapedit are available from http://www.boutell.com/.

The map files should be situated in your directory on the server. If you have all your map files in a directory called ‘maps', and wish to add hotspots to an image called mainmap.gif, the HTML code would look like this for a mail file called main.map:

<a href="/cgi-bin/imagemap/maps/main.map"> <img src="mainmap.gif" ismap></a>

You can find out much more information about image maps by looking at the external tutorials.

Back to the top

How do I use the counter?

To include the counter in your webpages, you need to add a line like this:

<img src="/cgi-bin/count" alt="Counter">

There is only one counter, so if you include it in two pages, the same number will be displayed on each one. You can alter the appearance of the counter by adding options to it. The first option should be preceded by a question mark, and there should be an ampersand (‘&' sign) between all the following options. For example, you can choose different character sets for the digits. The character sets are sorted alphabetically. You can also make the counter display the number of visitors, or the current time or date. So, to choose style ‘H' and display the date, you would include this in your page:

<img src="/cgi-bin/count?dd=H&display=date" alt="Counter">

Other options allow you to change the colour of the counter, make it transparent, or tell the time. More information about these options is available from the Count 2.3 homepage. The Homepages counter supports all the options related to the appearance of the counter, as outlined on that page.

This CGI is a modified form of Count 2.3 by Muhammad A Muquit and Kevin J Walsh.

Back to the top

Can I still use the Homepages scripts if I upgrade?

If you upgrade your Homepages account to one of our new commercial web hosting offerings (hosted on the same server platform) then you will still be able to use the Homepages CGI scripts with your old Homepages URL provided the dial up or broadband account associated with the Homepages URL remains open. This is to provide an easy upgrade path to our commercial web hosting products, so you do not have to start immediately modifying the content and layout of your site when you upgrade.

Our commercial web hosting offerings also come with a more advanced set of easy to use scripts, such as an email form that allows you to set the recipient email address and add templates to set the look of the ‘thank you' message. For more details of these features, please see the examples at http://websupport.demonweb.co.uk/zisp-examples/.

Back to the top




*