Some tips about the response header:
Host:address URL, host is the address identifier that the browser provides to the server. Because the HTTP protocol is stateless, the server needs to determine, based on this information from host, which server the message is sent to.
Cookie:phpssessid = .... When the browser visits the website for the first time, the server places the sessid of the session into a cookie, giving the session an identity. This identification identifies a session on a machine. In other words, this cookie can be a session, and if you get the cookie, you can get the content in the session. This is the site exists a security risk: for example, login information and identity is present in the session, then the cookie is the sign of the login. If the cookie is stolen, the login information will be stolen at this time. Session Hijacking
Workaround: Use SSL header information for encryption. Disadvantage: Because SSL is a stateful link, and the resource consumption of the server is very large, and a server can only correspond to one IP (proxy server can not meet this requirement). Therefore, the maintenance cost is higher. At present, in addition to the banking system, Gmail is to support the full SSL implementation of the site.
Location: Records the redirect address of the current request, which is a temporary redirect, and the request is not cached in memory, but instead directly accesses the address pointed to by locations. Status Code: 302 (301 for permanent redirection)
X-powered-by: Display the current server running environment and version, such as: php/5.2.5, the display of this item will cause the disclosure of server information, can be banned in php.ini: Expose_php=off
Function:
Session_Start (): Start using session, all pages to use the session must call this function, so the function can be placed in the more common files, such as config.php
Function_exist (): Determines whether the function is defined and returns a Boolean value.
Htmlspecialcharts (): Escapes the special characters in the argument. Returns the escaped string.
PHP Learning Notes (v)