E-topbiz.com - php scripts and cgi scripts shop!

  • Proud Php And Cgi Scripts Provider Since February 2003!

  • More Than 9000 Satisfied Customers Can't Be Wrong!

  • More Than 11000 Scripts Sold - Guaranteed Quality!

  • Fair $70 Value Free Bonus With Every Script Purchase!

  •  • 
 
php
  HOME PAGE   •  CONTACT US   •  ALL SCRIPTS LISTED WITH PRICES   •  RESELL OUR SCRIPTS AND MAKE MONEY!  
PHP
 

 • Our Articles: HTTP With Cgi

 
Here in this article we discuss the role of HTTP. We all know that it the work of HTML to collect data from the client side and send this data to the host side or to the Cgi program. But we arrive at the question and the importance of HTTP here. How does data reach the host side? The answer is via HTTP.
 
  This magic of sending the gathered data to the Cgi program is done by HTTP headers. Here the HTML tags come into action. These HTML tags tell the browser what type of HTTP header to use to talk to the server - Cgi program. The basic HTTP headers for starting the communication with the host side or the Cgi program are GET and POST headers.  
  GET sends the form information back to the server as part of the URL when the request is made for the Cgi script. That's not as bad as it sounds, but an example at this moment might help you to clear your doubts. If you ever used a the huge search engines like Web Crawler, you would have noticed how convoluted the URLs look after your search results have been returned. Typically, they look like this:  
  http://www.somewhere.com/cgi-bin/script.pl?firstname=mark  
  Do you see that part after the question mark? That is the information that was enclosed in the form. The form contained something like a text field called "firstname", which had to be entered by the user and the user entered "mark" as it's value. In terms of Cgi, the information contained in the part of the URL which is after the question mark is called the QUERY_STRING, which consists of a string of name=value pairs separated by ampersands (&).  
  There are some advantages of GET which include the ability to "bookmark" the search results, since the submitted information is part of the URL. The biggest disadvantage of using GET is that the QUERY_STRING is limited to the input buffer size of your server.  
  In case of POST, there is no information added to the URL when a Cgi script is called. Instead, the information is sent after all your request headers have been sent to the server.  
  If a hypertext HTML link is calling your program, then the HTTP request method Get is used to communicate the request to the server side- Cgi program, and this header GET is used by default. An example:  
  <a href="www.e-topbiz.com/program.cgi">, call a Cgi program </a>  
  In case the form tag is defined for post then, a POST method request header is used to communicate with your Cgi program.  
  After the method of sending the data is fixed, the data is configured and sent by one of the get or post methods. If the GET method is used in sending the data, the data is sent through a Uniform Resource Identifier (URI) field. If the POST method is used in sending the data, the data is sent as a separate message, after all the other HTTP request headers have been sent out to the host side.  
  After it has been decided as to how to send the data, whether by GET or POST, the browser makes a HTTP request header to the location where the Cgi program is located. After receiving the HTTP request, the server calls the Cgi program. Several other request headers can also go along with the request header to give the server and your Cgi program more useful data from the browser and client side.  
  The Cgi program now performs some function according to the request and then tells the server what type of response it wants to send back to the server. The server and the Cgi program together send HTTP response headers back to the client side. The HTTP response headers come into use over here. They tell the client browser what type of information is coming back from the host server.  
  Therefore, now you can imagine how the whole thing works. HTML formats the data; HTTP sends the data, Cgi works on it, sends it back with the help of HTTP and it translates the data into meaningful information!  
  Written by Goran Kusnjer,
E-Topbiz.com owner 
 
   
  php scripts shop  
  Home Page  •  About Us  •  Sitemap  •  Our Articles  •  Terms Of Use/Privacy  •  Frequently Asked Questions  
  Our Partners:  TurnKeyPot.Com  
  •  All rights reserved © 2003-2014 E-topbiz.com  •  HTML Valid  •  CSS Vaild  
  php scripts shop