"What are the advantages of fsockopen() over fopen() for use with HTTP connections" The former gives up much more control: not only can we choose a different HTTP port (such as 8000, or 8080), but we can also send different types of request through.
"Which function can be used to make a script instruct visitors to redirect to another URL" The answer is "d", header().
"Using Apache, what filename is used to specify authorisation is required" The answer is ".htaccess", but be wary - using .htaccess files requires enabling the module mod_access, which is very slow!
Next chapter: Answers to Chapter 16 >>
Previous chapter: Answers to Chapter 14
Home: Table of Contents
Copyright ©2015 Paul Hudson. Follow me: @twostraws.