How can I detect if the user is on localhost in PHP?

前端 未结 9 1323
耶瑟儿~
耶瑟儿~ 2020-12-12 12:45

In other words, how can I tell if the person using my web application is on the server it resides on? If I remember correctly, PHPMyAdmin does something like this for securi

9条回答
  •  情书的邮戳
    2020-12-12 13:38

    How about to compare $_SERVER['SERVER_ADDR'] === $_SERVER['REMOTE_ADDR'] to determine if client is on the same machine as server?

提交回复
热议问题