curl-and-php
Re: Get the User-Agent string?
Date: Thu, 11 Nov 2010 22:29:36 +0100 (CET)
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-phpReceived on 2010-11-11