creation basics • 
uploading web pages • 
additional features • 





Additional Features

Using Common Gateway Interface (CGI) will allow you to add additional features to your site, such as a counter of visitors. In addition, the steps how to allow your visitors to email you a form are provided. If you need password protection click here for further help.

Residential Webpage Counter

The following scripts will work on pages with Sentex in the web address (for example, http://www.sentex.net/~jqpublic). If you have your own domain name you will need a different counter, which can be found at the links listed below, otherwise this counter will display stats about Sentex page hits on your pages.

To put a counter on your web page, 2 commands that you can use are:
<!--#exec cgi="/cgi-bin/counter-ord"--> or
<!--#exec cgi="/cgi-bin/counter"-->

If you put the following line on your page:
You are the <!--#exec cgi="/cgi-bin/counter-ord"--> person to visit ...
It will produce output like this:
You are the 6378th person to visit our page

OR if you use this line:
You are visitor number <!--#exec cgi="/cgi-bin/counter"-->
The output will look like this:
You are visitor number 6379

Counter Hints:
  • Don't call your script directory cgi-bin
  • Script file must end with .cgi
  • Script file must be executable - chmod a+x scriptfilename.cgi
  • Data file must be readable and writeable - chmod a+rw datafilename
  • To find the path to your directory (on our server) type pwd from the prompt of granite
  • You can move, delete and rename files (on our server or your computer) with your FTP program. You can also create directories.

  • Counter Sites:

  • nms Perl scripts
  • Dream Catcher's CGI Scripts

    Please email technical questions to


    Webpage Forms

    Many people want the contents of a form sent to their email address from users of their website.
    There are many scripts available on the internet to do this.
    Source Forge is probably the most popular repository of CGI scripts currently available on the internet.

    In thie following example John Q. Public wants people to email him their favourite colour.
    Here is what he wants the form to look like...


    Your Favourite Colour:


    He wants the contents of the form to be emailed to him. His email address is . He has a webpage called thanks.html and after someone has filled out his form John wants them to see that page. To do all this he has typed an action setting in his form. It calls the script and passes it two addresses: his thanks page and his email.
    Taking a closer look at the form tag...
  •   <form (add a space)
  •   action=" (action is an attribute of the form tag)
  •  /cgi-bin (the path to the script - Sentex's main script directory)
  •  /email.cgi (the name of the script)
  •  ? (starts a query using the post method)
  •  nexturl= (the first variable to be passed on to the script)
  •  http://www.sentex.net/~jqpublic/thanks.html (the value of the first variable - the web address of the page people see after submitting the form)
  •  & (separate the variable/value pairs with an ampersand - Maybe you noticed this one time while you where using a search engine - E.G. search.cgi?something=this&somethingelse=that)
  •  rcpt= (the next variable and its value - rcpt is for recipient - John's email address - or the one to which he wants the form to go)
  •  " (end of quote that began with action=" - be sure not to add any extra quotes or spaces)
  •  (a space here) method="post" (one of two ways a form may send information on)
  •  > (and finish the tag with the greater than symbol)


    Here is some of the HTML code that he used...
    (The line has been broken up to make it easier to read. Don't put any spaces or extra quotes inside action="".)
    <form action="/cgi-bin/email.cgi?nexturl=
    http://www.sentex.net/~jqpublic/thanks.html
    &rcpt= " method="post">
    Your Favourite Colour:
    <input type="text" size="30" name="colour">
    <input type="submit" name="Register" value="Submit Form">
    <input type="reset" name="b2" value="Reset Form">
    </form>



  • Other Script Sites:

  • Free-Scripts.net
  • SourceForge.net

    Please email technical questions to

     

     

  •  

    Copyright © Sentex Communications Corporation. All Rights Reserved
    Sitemap - Privacy Statement - Contact Us