Answers to Chapter 15

  1. "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.

  2. "Which function can be used to make a script instruct visitors to redirect to another URL" The answer is "d", header().

  3. "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

Jump to:

 

Home: Table of Contents

Follow us on Identi.ca or Twitter

Username:   Password:
Create Account | About TuxRadar