Definition of CGI in English

General information about CGI

As defined on abbreviationfinder, CGI stands for Common Gateway Interface which enables the web browser to communicate with scripts (scripts) on the server. Information from and to the web page is transmitted and processed by the CGI script and presented in a way that is readable to the web browser. Does that sound complicated? Yes. Well, maybe it’s not for a beginner. But some things are useful without much hocus-pocus.

CGI scripts can be written in different languages ​​but C ++ and Perl are most common. Examples of CGI are pages with forms for filling in, searching databases, ordering something via a web page, counter and guest books. Most Internet service providers have to apply to upload their own CGI scripts. Some crossbows but others approve.

CGI - Common Gateway Interface

The CGI scripts should be placed in a special directory that your ISP will direct you, often called cgi-bin. It is no idea that you create your own directory on your workspace on the server. It doesn’t work, unfortunately. Check out here, lots of free scripts you can use on other people’s servers. Also http://www.bravenet.com/ is worth a visit, form mail etc.

Posting cgi scripts

If you do not have access to your own cgi bin, you can skip this section and continue below. This is a beginner’s guide, but upon request I will briefly discuss what to think about when creating your own scripts. Here you can download some scripts from Matt´s , or check out www.stars.com . It is very important that you read the supplied readme.txt. What does a .pl file look like? Here is an example .

  • Find out where you have your perl interpreter. Often it is in usr / bin / perl. The correct path to the interpreter should ALWAYS be at the top of the .pl file.
    #! / usr / bin / perl
    Then you need to know the different paths on your server. But in ex. Matt’s readme.txt files are examples of how it should be, if you are on Algonet which has cgi-wrap check on their support page.
  • Upload the .pl files in ASCII, very important! When you upload the files, they should be chmoded, ie you should change the write / read permissions on the files. Often to 755 but it is in the readme.txt file how the various files should be chmoded. The easiest way to do this is via Ws-ftp when you have uploaded the files in the right place.
  • Then test run remains 🙂 . If you are lucky it works the first time. How to modify the perl script itself I do not address here. Read more about cgi and perl at Jojoxx (sv).

Coun best
first check with your service provider if it has the will and the ability to provide their subscribers with a counter (counter) on the websites. Talk a little, you might be able to get help with creating your own CGI script if they don’t provide counters. You can get a free calculator out of the net. Test Netzapp , The Counter , http://www.tenzero.com/ , Web tracker or Jcount . Some of these calculators also have the opportunity to give you statistics on your visitors. Otherwise go to Yahoo and do a search on the counter.

Guest book The
principle is the same when it comes to obtaining a guest book. Chat with your network operator or get a free guestbook. The one that you can get for free over the Internet does not have all the features like the guestbook that is uploaded via CGI script on the server. Although you are only a little driven you can actually get to it too. Just read the instructions carefully.

A guestbook gives everyone the opportunity to give rice and praise. Everyone who is surfing does not actually have their own email address so they can contact you via email. Try http://www.theguestbook.com/ or http://www.bravenet.com/ .

Formmail
Formmail via cgi scripts is better than using a mailto form, see www.cgi-resources.com .

WWWBoard Message
board or as I call it WWWBoard (bulletin board) has become very popular. It is a cgi script that allows you to answer and send questions like in a virtual conference. See, for example, You can get tips on wwwboard services at http://www.cgi-resources.com/ or forum24 .

Search
index You can find your own search index here http://www.cgi-resources.com/ . Nowadays, even via Google ,you canfix your own little search engine on your site.

Mailing
lists Mailing lists have become popular. Here, http://groups.yahoo.com/ you can create your own or search for other interesting mailing lists. At http://www.liszt.com/ there are over 90,000 mailing lists to choose from. Remember to save the information you receive then how to unsubscribe from the mailing list. Cancel it even during holidays and other occasions when you do not open your mail. Otherwise, your ISP will not be happy. 🙂

Cookies – Cookie Monster?
Cookies are small “program” information fragments that the web server you visit places on your hard disk in a text file. Cookies have been getting a lot of talk lately. Some are concerned that cookies could transmit viruses or otherwise damage the browsers’ integrity. You can turn off the cookies transfer in ex. Netscape via Option / Network preferences / Protocols. This gives you the opportunity to accept or refuse cookies. Session cookies are only available when you visit the site. Persistent cookies are stored on your hard drive between your visits to the site. Cookies can be written via cgi programming but also via javascript ( read more here ). You can read more about cookies at http://www.cookiecentral.com/

SSI
With SSI – Server Side Includes, you can insert another document (such as a .txt file) on its page or ensure that a command is executed. You write and call the file via a comment in your editor. When the page loads, the server is called and the document is loaded or the command executed, an html file with an embedded SSI command should be renamed with the .shtml file extension (some servers require this). Not all ISPs give their customers access to SSI.

A good example is Tele 2’s calculator. In your editor you enter:
You are visitor number <!–#exec cgi=”/cgi-bin/counter”–>
When your page is loaded, the server is called and gives the number to enter. The result on this page might look like this:
You are visitor number 13 999

Asp & php
Asp (Active Server Pages) is associated with Microsoft’s Internet Information Server (IIS), which itself runs on a Windows NT machine. Instead of renaming the file to .html, it is renamed to .asp, which allows IIS to run the scripts included in the file. Most common is VBscript or JSscript. See the TIPS section to find a free site with opportunities to test asp. An example of how it might look:
coded into the .asp file
<P>Dagens datum och tid <%= Now %>.
Then the result (when the page loads) will be displayed as:
Today’s date and time 1/6/99 11:40:02 AM.

Php (Hypertext Preprocessor) is a language that borrows heavily from C, Java and Perl and has its own unique features. Like asp, php is embedded in the html page. Php is a powerful programming language as it suits Unix-based servers, which are the majority on the Web. You can find more info here, http://www.php.net/ , SNT (en) , http://php.linux.se/ and here http://www.phpbuilder.com/ .