|
I've seen PHP scripts used to block hotlinking of media doing something like the following:
1. User visits main site or gallery.
2. PHP script adds the surfer's IP to a list of valids.
3. Large file downloads are checked by IP against the list of valids. Invalids are redirected to main site or gallery. Valids receive the file (via either passthru or protected rewrite).
4. Valids are removed from the list after not being seen for an hour or so.
This approach has problems when the surfer doesn't have a consistent IP address (eg, anyone using AOL as an ISP), and can cause spurious alerts from tools testing/verifying a site's structural integrity.
|