Hey,
Yes you can use php - all it usually does is checks that you are coming from your domain, for example if your domain is
www.porn.com it will check that the referer was
www.porn.com/something/something
Its probably better to use .htaccess file(s) that way you are defo coverered:
RewriteEngine on
RewriteCond %{HTTP_REFERER} !^$
RewriteCond %{HTTP_REFERER} !^
http://(
www.)?domain.com/.*$ [NC]
RewriteRule .(gif|jpg|mpeg|avi|mpg)$ - [F]
(save as .htaccess/upload and rename as .htaccess)
If you put a .htaccess file in your root directory it will apply for your whole site. If you just wanna protect the media in a folder then just stick one in the folder.
