How to reliably identify a website
file, php, statistics
Solution
If a website is only linking to a file, the "website" itself will never actually access your image. Instead, the client who's viewing the site will make a request for the image.
As such, you're depending on information sent by the client, which is completely out of your control and not reliable at all. If you have the opportunity to set some sort of unique cookie on the client, you may be able to use this in some fashion for extended identification, but even that won't be reliable.
There is no 100% reliable solution.
Problem
I have a file that is being linked to from other sub websites. The file: `http://site.com/file.img` Website A linking to it `<img src="http://site.com/file.img"></img>` website B linking to it `<img src="http://site.com/file.img"></img>` I need to reliably identify which of these websites has accessed the file, but I know that `$_SERVER['HTTP_REFERER']` can be spoofed. What other ways do I have to reliably confirm the requester site? By IP, get them to register an IP? not sure. setup an API key? What options are there?