CGI: What the Heck Is That?

     

A great Manager is a Great Communicator
Category:
 

Web Hosting Geeks : Web Hosting Guide
Category:
 

Merchant Account Fraud Protection
Category:
 

Why You Need A Website
Category:
 

Senegal's Wade Says Africa Rejects EU Free Trade Deals
Category:
 

Struggling With Addictions
Category:
 

Shopping directory - making our search more efficient
Category:
 

New Patent Law Likely to Benefit Indian Drug Industry
Category:
 

Mainland Investors Allowed to Buy Hong Kong Stocks Under Pilot P...
Category:
 

With my Credit Score can I get a mortgage?
Category:
 

New and Improved... Or Is It?
Category:
 

Maintenance
Category:
 

Today’s Election Seen as Referendum on Bush Administration
Category:
 

Middle East Quartet Meets on Efforts to Revive Peace Talks
Category:
 

How to Win at any Online Casino!
Category:
Entertainment / Television  

How Visual Subliminal Mind Programming Tools Can Enhance Your Li...
Category:
 

Rice Urges Continued Involvement in Afghanistan
Category:
 

Death Toll Nears 100 from Bombings in 2 Baghdad Markets
Category:
 

The 21st Century Way To Build Equity
Category:
 

Freelance Writer
Category:
careers  

How To Run A Stress-Free Online Business
Category:
 

Nigerian Plane Crashes in Port Harcourt
Category:
 

What Are The 3 Critical Exercise Routine Success Factors?
Category:
 

UN Examining Expulsion of Darfur Humanitarian Officer
Category:
 

Somalis Flee Capital After Fierce Fighting Between Insurgents, E...
Category:
 

Medvedev Says Putin Should Be Russia's Next Prime Minister
Category:
 

I - I - iMac! Hype Meets Analysts
Category:
 

Love Your Way to Success
Category:
 

Do you know battery is still the main challenge in the developme...
Category:
 

Yin Yang Relationships - How to Find YOUR Perfect Partner
Category:
 

Five Reasons Why the Number of Web Pages Does Matter
Category:
 

Memory and Menopause
Category:
 

A Must Have Leadership Book - The Facilitative Leader
Category:
 

A Success Essential - Join A Mastermind Group
Category:
 

South Africa's Mbeki: Mixed Feelings Toward Chinese Investment i...
Category:
 

eBay as a Business
Category:
 

Media Watchdog Group: Iraq World's Most Dangerous Place for Jour...
Category:
 

Hamas Proposes Prisoner Exchange After Israeli Forces Enter Gaza
Category:
 

The Secret Of Constantly Making Sales To Past, Present & New Buy...
Category:
 

Branding - the myths and the realities
Category:
 

Why Personalized Candy Wrapping Businesses Are In Big Demand
Category:
 

Choose the Right Offerings to Expand How Much Value You Add
Category:
 

Expired Domain Name Traffic
Category:
 

Sri Lankan President Opens Reconstruction Phase of Tsunami Relie...
Category:
 

Top Ten Ways to Achieve Your Goals
Category:
 

Disneyland - Fun for All the Family
Category:
Travel  

Will Adsense Arbitrage die?
Category:
 

Alternative Treatments for Insomnia
Category:
 

How to Choose Discount Wood Blinds
Category:
Home And Family  

How to Deal With the Many Causes of Anger that Confr...
Category:
 

Corporate Performance Management Solutions
Category:
 

Check Cards versus Credit Cards
Category:
Finance / Investment  

Sudan Rejects UN Statement Alleging Increased Darfur Violence
Category:
 

Cool-Games
Category:
 

Mandatory Evacuations Ordered as Category 5 Storm to Strike US G...
Category:
 

How to Write Persuasively
Category:
 

How To Avoid Mistakes When Investing In Shares
Category:
 

Printing's Lingo
Category:
Business  

Coin Collecting on a shoe-string budget
Category:
Hobbies / Pastimes  

HRA Plans for Small Business Owners
Category:
 

Killer Quads
Category:
 

Mortgage Tips from Me to You
Category:
 

Rice Says Bush Iraq Strategy Needs More Time
Category:
 

Iraqi National Football Team Returns for Hero's Welcome
Category:
 

Keeping the customer satisfied
Category:
 

The Importance of Referrer Logs and The Internet
Category:
 

What Is The Cost Of Declaring Bankruptcy And Are There Any Other...
Category:
 

Three Steps For Success
Category:
 

Silicone Awareness Bracelets Are More Than Just A Fashion Statem...
Category:
Home And Family  

Landing That Ideal Fishing Vacation
Category:
sports  

Annuity Leads
Category:
 

Intensifying Esteem Of Movie And Music Online
Category:
 

Mali Court Convicts 6 for Insulting President
Category:
 

China Denies Report of Terrorist Threat in Beijing Hotels
Category:
 

The Inner Landscape: The Energy of Beliefs, Thoughts, and Feelin...
Category:

       

CGI What the Heck Is That 0 article

CGI: What the Heck Is That?


Let's unlock a little bit of the mystery about something called CGI.

By Richard Lowe
Category: 0

Submit your Recipes Here!


Let's unlock a little bit of the mystery about something called CGI. If it
helps any, CGI means Common Gateway Interface. This is a method which is
used to exchange data between the server (the hardware and software that
actually allows you to get to your web site) and a web client (your
browser). CGI is actually a set of standards where a program or script (a
series of commands) can send data back to the web server where it can be
processed.

Typically, you use standard HTML tags to get data from a person, then pass
that data to a CGI routine. The CGI routine then performs some action with
the data.

Some of the more common uses of CGI include:

- Guestbooks - The CGI routine is responsible for accepting the data,
ensuring it is valid, sending an email acknowledgement back to the writer,
perhaps sending an email to the webmaster, and creating the guestbook entry
itself.

- Email Forms - A simple CGI forms routine just formats the data into an
email and sends it back to the webmaster. More complicated routines can
maintain a database, send an acknowledgement and validate data.

- Mailing List Maintenance - These routines allow visitors to subscribe and
unsubscribe from a mailing list. In this case, the CGI routine maintains a
database of email addresses, and the better ones send acknowledgements back
to the visitor and webmaster.

A CGI routine can be anything which understands the CGI standard. A popular
CGI language is called PERL, which is simple to understand and use (well,
compared to other languages). PERL is a scripting language, which means each
time a PERL routine is executed the web server must examine the PERL
commands to determine what to do. In contrast, a compiled language such as
C++ or Visual Basic can be directly executed, which is faster and more
efficient.

Okay, in a nutshell (and greatly simplified), here's how it works:

1) You (the webmaster) specify a form tag which includes the name of the CGI
routine.

2) You create HTML tags which retrieves data from your visitors.

3) Each of the input tags includes a variable name. The data which is
retrieved from the visitor (or directly set if the tag includes the "hidden"
qualifier) is placed in the variable name.

4) When the visitor presses the "submit" button, the CGI routine which was
specified in the form tag is executed. At this time, the CGI routine "takes
control", meaning the browser essentially is waiting for it to complete.

5) This CGI routine can get data from variable names. It retrieves the data
and does whatever action is required.

6) When the CGI routine finishes, it returns control back to the web client
(the browser).

Some important things to remember about CGI routines:

- You can install CGI routines on your own site if your host allows it -
Addr.Com is an example of a web host which allows for CGI routines. Some web
hosts do not allow you to install your own routines but do provide some
pre-written ones to you. If these are not sufficient for your needs, you can
find a remote hosting service to provide the necessary functions.

- Generally, if you install your own routines they must be installed in the
cgi-bin directory of your site. This is a special location which allows
scripts and programs to be executed.

- CGI routines work best on Apache-style servers. Windows NT and Windows
2000 does support CGI, but it tends to be slow and problematic.

- If you use a remote hosting service, you must remember that although they
appear to be giving you this for free, you are actually paying a price.
Usually they want to display advertisements, although some of them actually
take visitors away from your site.

- When you write a CGI routine, you have the choice of a scripting language
like PERL or a compiled language such as C++ or Visual Basic. Anything which
can execute on the web server is acceptable.

I hope this short introduction to CGI has cleared up some of the mystery.


About the Author

Richard Lowe Jr. is the webmaster of Internet Tips And Secrets. This
website includes over 1,000 free articles to improve your internet
profits, enjoyment and knowledge.
Web Site Address: http://www.internet-tips.net
Weekly newsletter: http://www.internet-tips.net/joinlist.htm
Daily Tips: mailto:internet-tips@GetResponse.com