Hack Proofing your E-commerce Site: The Only Way to Stop a Hacker Is to Think Like One

In the previous section, we looked at client-side programs and scripts, which run on the user's machine. In this section, we look at server-side programs and scripts, which run on the Web server rather than on the machine being used to browse your site. Server-side programs and scripts provide a variety of functions, including working with databases, searching your site for documents based on keywords, and providing other methods of exchanging information with users.
A benefit of server-side scripts is that any source code is hidden from the user. With JavaScript, any scripts are visible to the user by viewing the source code through the browser. Although this isn't an issue with some scripts, server-side scripts may be used to access confidential information. The last thing you want to do is reveal how information in a corporate database may be accessed.
The CGI allows communication links between Internet applications and your Web server, allowing users to access programs over the Web. The process begins when a user requests a CGI script or program using his browser. For example, the user might fill out a form on a Web page and then submit it. The request for the processing of the form is made to the Web server, which executes the script or application on the server. After the application has processed the input, the Web server then returns output from the script or application to the browser.
CGI uses the HTTP protocol in the TCP/IP protocol suite.