Jump to content


This topic is now archived and is closed to further replies.

Guest convention

Using cookies/sessions to restrict access to files such as pdf, doc, etc.?

Recommended Posts

Guest convention
I know how to work with cookies and sessions, but I am wondering if they can be used to restrict direct access to files other than PHP (such as PDFs, DOCs, MP3s, etc.)? Like, if someone typed into their browser's address bar: 'www.mydomain.com/example.pdf' and if they don't have a cookie set, it would redirect them, give them a message, or something? Thank you.

Share this post

Link to post
Share on other sites


Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.