swarley.me.uk
How to wrap basic HTTP authentication with PHP
Suppose you have a file hosted on an Apache server that is protected by Basic HTTP Authentication, often via an old-school ‘.htaccess’ file, to prevent anonymous users from downloading …