开发者

What information will be send if a user make a normal http request?

I know I can get the user ip: $_SERVER['HTTP_CLIENT_IP'];

the user user's agent: $_SERVER['HTTP开发者_StackOverflow_USER_AGENT'];

What else information can I get from the user from a normal http request? Thank you.


If you use phpinfo() on a test page, you can see the values that will get back for your current webserver. The results different from server to server but should be consistent on your server. You are best to Google the names too, to see their exact purpose and meaning.

You can also use print_r($_SERVER); to list the server variables specifically.


How do you define "normal"? Even the user agent is not required. It is a "should" not a "must". The W3C has a list (part of RFC 2616) of major headers that may be there.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜