HTTP Connections

It will be helpful to review how data travels between a browser and a Web server. I will review it simply for purposes of illustration, but you may wish to refer to detailed descriptions, such as those found on the W3C Web site <http://www.w3.org/Protocols/>.

When you type a URL into the location box on your browser, the first task of the browser is to break it up into important parts, the first of which is the protocol, HTTP. Next is the name of the Web server, to which the browser makes a connection. The browser must tell the Web server which document it wants, and it does so using the HTTP protocol. Before completing the request, the browser may provide lines of extra information called headers. These headers let the server ...

Get Core PHP Programming: Using PHP to Build Dynamic Web Sites now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.