Inspect the referrer in PHP

前端 未结 4 1042
星月不相逢
星月不相逢 2020-12-06 00:44

Is it possible to check who is entering your website in PHP. I have a web application ( written in PHP) that should only allow users entering from some particular websites.

4条回答
  •  执笔经年
    2020-12-06 01:15

    You cannot trust the referrer. Despite coming from the $_SERVER array, it is actually a user/browser supplied value and is easily faked, using such things as the Firefox RefControl addon.

提交回复
热议问题