PEARs HTTP_Client and custom User-Agent

February 24th, 2006

The only way to get a custom User-Agent string to HTTP_Client is by deriving HTTP_Client and overloading the method _createRequest.

Although HTTP_Client with its constructor provides a way to pass custom headers, the User-Agent header is also set inside HTTP_Request (create by HTTP_Client) which overrides any earlier value.

Entry Filed under: PHP

Leave a Comment

hidden

Some HTML allowed:
<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

Trackback this post  |  Subscribe to the comments via RSS Feed


Calendar

February 2006
M T W T F S S
« Dec   May »
 12345
6789101112
13141516171819
20212223242526
2728  

Most Recent Posts