1: |
Which server variable might give you the URL of the referring page?
|
2: |
Why can you not rely on the $_SERVER['REMOTE_ADDR'] variable to track an individual user across multiple visits to your script?
|
3: |
What does HTTP stand for?
|
4: |
Which client header line tells the server about the browser that is making the request?
|
5: |
What does the server response code 404 mean?
|
6: |
Without making your own network connection, which function might you use to access a Web page on a remote server?
|
7: |
Given an IP address, which function could you use to get a hostname?
|
8: |
Which function would you use to make a network connection?
|
9: |
Which PHP function would you use to send an email?
|
| |
A1:
| You can often find the URL of the referring page in the $_SERVER['HTTP_REFERER'] variable. |
| |
A2:
| Many service providers allocate a different IP address to their users every time they log on, so you cannot assume a user will return with the same address. |
| |
A3:
| HTTP stands for Hypertext Transfer Protocol. |
| |
A4:
| A client might send a User-Agent header, which tells the server about the client version and operating system that are running. |
| |
A5:
| The server response 404 means that the requested page or resource cannot be found on the server. |
| |
A6:
| The fopen() function can be used for Web pages on remote machines as well as files on your file system. |
| |
A7:
| The gethostbyaddr() function accepts an IP address and returns a resolved hostname. |
| |
A8:
| The fsockopen() function establishes a connection with a remote server. |
| |
A9:
| You can send email with the mail() function. |