Reliability of PHP'S $_SERVER['REMOTE_ADDR']

后端 未结 3 2043
慢半拍i
慢半拍i 2020-12-31 13:03

I\'m building a site that is designed to be administered from localhost, but contains pages that expose data to internet or local network users. Can I rely on PHP\'s

3条回答
  •  轻奢々
    轻奢々 (楼主)
    2020-12-31 13:33

    No. It depends on the web server whether is serves up remote_addr or not.

    RETRACT THAT...was thinking about HTTP_REFERER.

    It should give you the ip address...yes. Remember there could be proxy's.

提交回复
热议问题