May 2003
Intermediate to advanced
592 pages
14h 28m
English
HTTP (HyperText Transfer Protocol) is the technology at the heart of the World Wide Web because it defines the way clients and servers can communicate (in layman’s terms). When a browser requests a Web page, it receives a series of HTTP headers in return.
PHP’s built-in function header() can be used to take advantage of this protocol. The most common example of this will be demonstrated here, when the header() function will be used to redirect the Web browser from the current page to another. However, in Chapter 10, “Extended Topics,” you’ll see how to use header() to affect page caching, and in Chapter 8, “Security,” you’ll use it to perform HTTP authentication.
To use header() to redirect the Web browser, type
header ("Location: ...Read now
Unlock full access