sounds like a job for the '.htaccess' file
<br /><IfModule mod_rewrite.c> <br />RewriteEngine On <br />RewriteCond %{HTTP_REFERER} !^$ <br />RewriteCond %{HTTP_REFERER} !^http://(www\.)?site_1_to_allow_linking.com/.*$ [NC] <br />RewriteCond %{HTTP_REFERER} !^http://(www\.)?site_2_to_allow_linking.com/.*$ [NC] <br />RewriteCond %{HTTP_REFERER} !^http://(www\.)?site_3_to_allow_linking.com/.*$ [NC] <br />RewriteRule \.(gif|GIF|jpg|JPG|mpg|MPG|mpeg|mpeg|mov|MOV|avi|AVI|wmv|WMV)$ http://www.YOURSITE.com/NO-HOTLINKING-IMAGE.jpg [R,L] <br /></IfModule> <br /> <br />IndexIgnore * <br /> just put this '.htaccess' file in your root directory (or in the sub directory if you only want files in that dir, and all of its subs to be affected)
Any site that is in your COND listing, will be alowd to hotlink to your files... all else will get the "NO-HOTLINKING-IMAGE.jpg" file... or whatever you've decided to call it...
The extensions that are in the RULE line, will be the only extensions affected by the rule.
....
if you are using a windows machine to upload and work on the '.htaccess' file on a *nix box... create a file called, 'htaccess.txt' with the included commands, then upload it to your server and at that point, rename it to '.htaccess'
best of luck!