I am trying to make a login that would give you access to some videos, pictures, and other files. I can do this with php and a get request (www.example.com/foo?video1) and making sure they have a cookie of some sort, but I am unsure how to prevent someone from just typing in the link of the source files (www.example.com/videos/video1.mp4). I need away to prevent people from accessing the source files.
System:
macOS Sierra 10.12.6
Apache
Thanks, Josh