Which to use: REMOTE_ADDR or SERVER_ADDR

前端 未结 2 706
我在风中等你
我在风中等你 2021-02-19 03:44

Any real difference between

$_SERVER[\'REMOTE_ADDR\']
$_SERVER[\'SERVER_ADDR\']

I\'m tracking visitors to a page, and I\'ve always used

2条回答
  •  春和景丽
    2021-02-19 04:28

    SERVER_ADDR is the address of the server PHP code is run on. You don't need to collect it. REMOTE_ADDR is the one you want.

提交回复
热议问题