How to securely identify a website

I have a file associated with other subsites.

File: http://site.com/file.img

Website Link to it <img src="http://site.com/file.img"></img>

B website associated with it <img src="http://site.com/file.img"></img>

I need to reliably determine which of these websites has accessed the file, but I know what $_SERVER['HTTP_REFERER']can be faked. What other ways can I reliably confirm the site of the requester? By IP, get them to register IP? not sure. configure API key? What are the options?

+3
source share
3 answers

If a website is only associated with a file, the website itself will never be able to access your image. Instead, the client browsing the site will request an image.

, , , - . - cookie , , .

100%.

+5

- , , .

, : - file.img - A - B, , - A - B - . file.img .

:

- A , , <img src="http://websiteA.com/file.img"/> ( A, ). file.img WebsiteA.com . - A - /file.img , http://site.com/file.img. , - A , - -. - A .

, - A B, , . , .

+2

Source: https://habr.com/ru/post/1778892/


All Articles