Difference between REMOTE_HOST and REMOTE_ADDR

后端 未结 4 1703
谎友^
谎友^ 2020-12-05 13:08

What is the difference between these two variables?

REMOTE_HOST and REMOTE_ADDR.

4条回答
  •  星月不相逢
    2020-12-05 13:17

    REMOTE_HOST pertains to the hostname of the client (i.e. the computer making the request). REMOTE_ADDR refers to the IP address of the client.

    There would be times when the hostname is unresolvable so the REMOTE_HOST will return the REMOTE_ADDR or the IP address instead.

提交回复
热议问题