Zend Certified PHP Engineer 200-550 Question # 12 Topic 2 Discussion

Zend Certified PHP Engineer 200-550 Question # 12 Topic 2 Discussion

200-550 Exam Topic 2 Question 12 Discussion:
Question #: 12
Topic #: 2

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");


Get Premium 200-550 Questions

Contribute your Thoughts:


Chosen Answer:
This is a voting comment (?). It is better to Upvote an existing comment if you don't have anything to add.