Best way to do this would be with .htaccess - mod_rewrite is so common these days that some simple rules in your .htaccess, plus a PHP script to take the external link as a _GET variable in it's frameset definition would be the best bet.
Now I've just had a look around for 15 minutes, and all the juicy stuff atm is related to prevention of hotlinking, but I'm sure there is such a facility...