Re: Get the User-Agent string?

Daniel Stenberg <[email protected]>
Newsgroups gmane.comp.web.curl.php
Message-ID <[email protected]>
On Thu, 11 Nov 2010, Tom Worster wrote:

> User-Agent: curl/7.19.7 (universal-apple-darwin10.0) libcurl/7.19.7
> OpenSSL/0.9.8l zlib/1.2.3

> In my application, I want to send an informative User-Agent such as this but 
> modified to identify also my application. Hence I want to find the proper UA 
> string for the php curl instance on the server so that I can manipulate it.

That's the user-agent the command line tool curl uses. libcurl that does the 
request and that PHP/CURL uses, doesn't have any default user-agent at all so 
you can't get that.

libcurl does however offer an API to extract all the version number infos etc 
if you would like to produce a string like the above, but I don't know exactly 
how or what the PHP binding exposes in that area.

-- 

  / daniel.haxx.se
_______________________________________________
http://cool.haxx.se/cgi-bin/mailman/listinfo/curl-and-php
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.