Dear internals, I would like to propose an RFC to add a new php.ini option called curl.user_agent which allows setting a default User-Agent for all cURL requests. This option is the equivalent to user_agent for stream based functions (like file_get_contents). The proposal is quite simple and has no backward incompatible changes.
Please have a look at the full RFC: https://wiki.php.net/rfc/curl_user_agent You can also find an initial discussion here: https://www.mail-archive.com/internals@lists.php.net/msg106186.html There is one open issue which Tyson raised to find the correct mode for the ini option. Either PHP_INI_ALL or PHP_INI_SYSTEM is currently being discussed. See here for all details: https://github.com/php/php-src/pull/6834/files#r628774432 The PR: https://github.com/php/php-src/pull/6834 I'd love to hear more feedback and hope to land this to 8.1, if everything goes well. Regards, Michael