http://qs321.pair.com?node_id=1002008


in reply to Redirect Script unless called from previous script

Simple, works for general case (but fakable) - check HTTP_REFERER environment variable.

More complex, works for all - have script A send a signed request, and have script B only run if that request is valid. There are many ways to do this - the best will depend on the environment you're coding in. Eg, Mojolicious has built in signed cookies, for example.