| HTTP_Request (Previous) | (Next) Basic Authentication | ||||
| |
|||||
|
|||||
With this package, one can easily perform HTTP request from within PHP scripts. It support GET/POST/HEAD/TRACE/PUT/DELETE, Basic authentication, Proxy, Proxy Authentication, SSL, file uploads etc.
Because of the above mentioned features HTTP_Request makes it possible to mimic big parts of web browsers such as the widely-known Mozilla browser in PHP applications. Possible application areas are:
Checking the validity of WWW links with the help of getResponseCode().
Grabbing remote web pages and parsing the result.
etc.
Example 48-1. Fetches yahoo.com and displays it
|
Example 48-2. Fetching two website in a row In this example, two websites are fetched and displayed. To the first one a POST parameter is passed. The POST data stack is cleared before the second website is fetched.
|
| HTTP_Request (Previous) | (Next) Basic Authentication | ||||||||
| |
|||||||||
|
|||||||||