Wrangling Headers
Handling headers is also relatively straightforward. The only header-specific convenience method that’s included is for handling Basic HTTP authentication, as shown below. <?php $request =& new HTTP_Request; $request->addHeader('name', 'value'); $request->removeHeader('name'); $request->setBasicAuth('username', 'password'); ?> © PEAR::HTTP_Client — Web Scraping >>> Back to TABLE OF CONTENTS <<< | |
Views: 380 | |
Total comments: 0 | |