Wednesday, 13 May 2009

Figure 1-1. Client and server communication without PHP










Here's what's happening in the numbered steps of the diagram:

  1. You type www.example.com/catalog.html into the location bar of Internet Explorer.

  2. Internet Explorer sends a message over the Internet to the computer named www.example.com asking for the /catalog.html page.

  3. Apache, a program running on the www.example.com computer, gets the message and reads the catalog.html file from the disk drive.

  4. Apache sends the contents of the file back to your computer over the Internet as a response to Internet Explorer's request.

  5. Internet Explorer displays the page on the screen, following the instructions of the HTML tags in the page.

Join Free Now : PHP Tutorial

PHP's Place in the Web World

PHP is a programming language that's used mostly for building web sites. Instead of a PHP program running on a desktop computer for the use of one person, it typically runs on a web server and is accessed by lots of people using web browsers on their own computers. This section explains how PHP fits into the interaction between a web browser and a web server.

When you sit down at your computer and pull up a web page using a browser such as Internet Explorer or Mozilla, you cause a little conversation to happen over the Internet between your computer and another computer. This conversation and how it makes a web page appear on your screen is illustrated in

Join Now Free : PHP Tutorial