Leeching Question
Posted: Mon Apr 19, 2004 9:31 pm
Hi,
I am hiding the URL of images using GD Library. Is there a way so that the picture will not be shown unless the URL of the site is my site?
Like lets say I would use <img src="http://www.mysite.com/stuff.php">
Stuff.php contains the image made in php
Now, mr. someone from leecher.com likes my image, looks at the img src. He uses <img src="http://www.mysite.com/stuff.php">
even though his web site is http://www.leecher.com. Is there a way to protect it so the script does not show?
Could I use this code?
Another question, will the 'if' command recognize http://www.mysite.com/links.php, since I only set it to http://www.mysite.com?
Thanks.
I am hiding the URL of images using GD Library. Is there a way so that the picture will not be shown unless the URL of the site is my site?
Like lets say I would use <img src="http://www.mysite.com/stuff.php">
Stuff.php contains the image made in php
Now, mr. someone from leecher.com likes my image, looks at the img src. He uses <img src="http://www.mysite.com/stuff.php">
even though his web site is http://www.leecher.com. Is there a way to protect it so the script does not show?
Could I use this code?
Code: Select all
<?
$domaincheck = $_SERVERї'HTTP_REFERER']
$mydomain = "http://www.mysite.com";
if($domaincheck == $mydomain){
echo 'You may download files. ';
} else {
echo 'Sorry, you may not download any files. ';
}
?>Thanks.