Chapter 16. Communicating with the Web Server

This lesson looks at ways in which PHP can interact with a web server.

HTTP Headers

Every page downloaded from a web server is a result of an exchange of HTTP dialogue. The web browser sends a set of instructions to indicate which page it wants to view, and the server responds with a response that indicates the success of the request, along with various other information that is not displayed directly on the web page.

The following HTTP headers show some of the information that is sent along with a typical web page from a PHP-enabled web server:

 HTTP/1.1 200 OK Date: Tue, 14 Dec 2004 21:17:28 GMT Server: Apache/1.3.29 (Unix) mod_gzip/1.3.26.1a PHP/4.3.9 mod_ssl/2.8.16 OpenSSL/0.9.7c X-Powered-By: PHP/4.3.9 ...

Get Sams Teach Yourself PHP in 10 Minutes 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.