Redirection and Referers
Intuitively, the ' redirect’ request option is used to set the maximum number of redirections to process before automatically terminating. Not so intuitively, it defaults to 0, which means that processing of redirections is disabled and you must explicitly set this request option to a value greater than 0 to enable it. The ' referer’ request option can be used to set the value of the Referer request header. Alternatively, it can be set via the 'headers’ request option (more on that shortly) when using the procedural API or the setHeaders and addHeaders methods of the HttpRequest class when using the object-oriented API. © pecl_http PECL Extension — Web Scraping >>> Back to TABLE OF CONTENTS <<< | |
Views: 389 | |
Total comments: 0 | |