Referer problem
| From: | Merlin | Date: | Mon, 31 May 2004 17:28:43 +0000 |
| Subject: | Referer problem | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-187289@lists.php.net to get a copy of this message | ||
Hi there,
I am trying to prevent hotlinking of images by other servers.
Pictures are generated on the fly by a php script, where I have included this code to prevent hot linking:
$haystack = $_SERVER['HTTP_REFERER'];
$needle = 'globosapiens';
$pos = strpos($haystack, $needle);if ($pos === false) { // not from globosapiens HEADER("Location:/g/p/2/hotlink_banner.gif"); exit; } It workes, but not for everybody. Some user tell me that they see the hotlink_banner.gif on my website as well. How is this possible? Has anybody an idea on where the error is, and how to fix it?` Thank you in advance, Merlin