Zend
200-710 · Question #98
When retrieving data from URLs, what are valid ways to make sure all file_get_contents calls send a certain user agent string? (Choose 2)
See the full explanation below for the reasoning.
I/O
Question
When retrieving data from URLs, what are valid ways to make sure all file_get_contents calls send a certain user agent string? (Choose 2)
Options
- A$default_opts = array("http"=>array("user_agent"=>"My Cool Browser")); $default = stream_context_set_default($default_opts);
- Bstream_context_set_option("user_agent", "My Cool Browser");
- Cini_set('user_agent', "My Cool Browser");
- Dstream_context_set_option($context, "http", "user_agent", "My Cool Browser");
Topics
#stream context#user agent#ini_set#file_get_contents
Community Discussion
No community discussion yet for this question.