Proxy Authorization | HTTP_Request_Listener |
HTTP_Request | |
PEAR Manual | |
Because HTTP is a protocol based on the Request - Response scheme, every HTTP request is followed by a HTTP response. HTTP_Request offers several methods to evaluate the information from these responses.
A important part of the HTTP response is the response code. The most well-known response code probably is 404, which you may have seen in your browser at several occasions. The meaning of 404 is that the requested ressource could not be found. A complete list of status codes can be found in RFC 2616.
Checking the response code
|
Similar to a HTTP request a HTTP response consists of a header and a body. HTTP_Request offers a method to access the header of the response.
Getting all headers from the response
|
This will print all headers and the appendant values.
Getting a specific header
|
This will print the value of the Date: header.
Fetching the cookies that are part of the HTTP response is described in the Cookies section.
Proxy Authorization | HTTP_Request_Listener |
HTTP_Request | |
PEAR Manual | |