Protecting inline elements from being linked directly ...
Posted: Thu Jan 23, 2003 12:22 pm
Hi all,
I want to protect my images from being linked directly from another website. I don't want to pay for the bandwidth while others are showing my art and graphics... If they want to show those they can upload them on their site...
Anyway I was reading something about sessions for another project when I came accros this extern_referer_check which in the text is used to prevent users coming from other PHP sites from taking over a session (highly improbable but there's always a chance).
I think this is to be set in the php.ini file.
Could that also be used to prevent other sites (PHP or otherwise) from linking directly to my images or othe inline elements? I'm already using a PHP script to display the image (loaded from a database) and I use $_SERVER['HTTP_REFERER'] to check out if the request for that image is local or from another server...
As you may well know this is far from foolproof... It depends on a miriad of factors one of those is the browser type and version. Some types or older versions don't send back the referer so the check can't be done and I have to let those pass...
Anywa I wanted to hear your thoughts on this.
I want to protect my images from being linked directly from another website. I don't want to pay for the bandwidth while others are showing my art and graphics... If they want to show those they can upload them on their site...
Anyway I was reading something about sessions for another project when I came accros this extern_referer_check which in the text is used to prevent users coming from other PHP sites from taking over a session (highly improbable but there's always a chance).
I think this is to be set in the php.ini file.
Could that also be used to prevent other sites (PHP or otherwise) from linking directly to my images or othe inline elements? I'm already using a PHP script to display the image (loaded from a database) and I use $_SERVER['HTTP_REFERER'] to check out if the request for that image is local or from another server...
As you may well know this is far from foolproof... It depends on a miriad of factors one of those is the browser type and version. Some types or older versions don't send back the referer so the check can't be done and I have to let those pass...
Anywa I wanted to hear your thoughts on this.