When retrieving data from URLs, what are valid ways to make sure all file_get_contents calls send a certain user agent string?

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)
A. $default_opts = array(‘http’=>array(‘user_agent’=>"My Cool Browser")); $default = stream_context_set_default($default_opts);
B. stream_context_set_option("user_agent", "My Cool Browser");
C. ini_set(‘user_agent’, "My Cool Browser");
D. stream_context_set_option($context, "http", "user_agent", "My Cool Browser");

Download Printable PDF. VALID exam to help you PASS.

Leave a Reply

Your email address will not be published. Required fields are marked *


The reCAPTCHA verification period has expired. Please reload the page.