[thelist] Preventing direct access while allowing PHP script access

minty freshness list.terrine at gmail.com
Mon Mar 27 05:10:24 CST 2006


Hello Listoids,

I have a bunch of SWF files, just say at "http://www.domain.com/swf/".
Now, I want my PHP script, eg, something like
"http://www.domain.com/swf_me_up.php?filename=someswf" to be able to
access these, obviously. However, I want to prevent people from simply
typing in something like "http://www.domain.com/swf/someswf.swf" and
accessing it directly (mainly because I want to extract money from
them first, *rubs mercenarious hands*).

I would've thought this would be quite a common desire, but I can't
seem to find any ideas on how to achieve it. Plenty of examples of how
to prevent "hotlinking", but evidently while this also concerns me,
it's HTTP requests from my *own* domain that's the worry at the
moment!

Any help would be very much appreciated!

Cheers and thanks.



More information about the thelist mailing list