I guess a better way of saying what I'm looking for is a 'conditional redirect'. I already have it looking at the HTTP_REFERER, so it will only run from my domain. However, I want it to only run from a specific script on my site, and if run without that script, I want it to redirect to an error page.