Setting SimplePie user agent
-
I am trying to set the user agent string for SimplePie.
I have tried to change the constant in the
wp-o-matic/inc/simplepie/simplepie.class.php
file by replacing the original define of SIMPLEPIE_USERAGENT.However, when I check the HTTP-request from WP-o-Matic it still uses the “old” user agent string.
I’ve also tried to set this value using phprc, with the same result.
What is the recommended way for setting the user agent string when using SimplePie with WP-o-Matic?
I looked in the code for SimplePie and noticed the constructor of the SimplePie class accepts a user agent parameter, and that neither SIMPLEPIE_USERAGENT nor user agent from phprc is used if that value is set.
Do you set the user agent in the creation of the SimplePie class?
Kind Regards,
/Erik
- The topic ‘Setting SimplePie user agent’ is closed to new replies.