PHP code for anti hotlinking

前端 未结 6 1157
深忆病人
深忆病人 2020-12-03 09:26

In our sites we are doing a image protection section. So as a part of image protection we need provide antihotlinking for images.In our site we are showing the image using a

6条回答
  •  情深已故
    2020-12-03 09:51

    You can try checking the value of $_SERVER['HTTP_REFERER'] against a known value, but as the documentation states, that can be spoofed. It might help against the common case, though.

提交回复
热议问题