See Serving Static Content using Plack
The search terms you're looking for are anti-hotlink and anti-leech
Its not something you want to do from CGI , its better to use mod_rewrite or mod_hotlink or something :)
Also of interest are Throttling your web server (Oct 00) and How can I use a CGI script to return an image?
In reply to Re: Serve a file from a CGI script
by Anonymous Monk
in thread Serve a file from a CGI script
by willymacoy
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |