I'll apologise in advance for this, it does equire tweaks and the suplied
version is $card_required.
I wanted this a little time ago and I've have killed for this much code.
It's not my usual policy to purposely break things but this is (but only ever
so slightly). Owing to the bature of the system I think you'll understand why
...
You'll need to tweak this a little.
+REQUIRED
Apache recent-ish
MySQL
mod_auth_mysql
+OPTIONAL
mod_ssleay
Before you start with this I'll point out that it's the not quite finished
version (see below). To grab the mistakes I made when adding stuff to it for
the customer which broke the non-payment system set your debug to 15 to catch
them all.
I've fixed this stuff (www.samlearning.co.uk/auth).
If you ain't got the time/inclination to fix the bugged version drop me a line
and I'll happily supply the non-bugged version (once I've removed essential
information)
There are something like 21 - odd files in the attach.
dbman.phtml - creates the dbs etc. The supplied default won't do anything (even
on my site). You'll need to ctrate a MySQL acct with create permissions to do
anything useful with this page.
tdefs.inc - change it to reflect your own site setup. Just have a look and
you'll see what I mean.
.htaccess - modify the sucker to reflect your choices.
Oh, yeah, you proibably ain't got SSL so make sure you either fix the code or
remove the S from the HTTP bit.
Please note that for my own site's security this is not quite the last version
of the system. $req_card dies a (ok, it's a bug - I don't want to give the
clean code out - see below) little and the urls refer to my home PC. It should
take anyone with more than a micro-gram of brain next to no time to slot in.
Again, aplogies for not supplying the complete answer - I've got to be careful
with things like auth systems (I'm sure you understand). If you wanna see it in
it's full glory try http://www.talksex.co.uk/ follow the spash and take the 2nd
link.
Finally (yup, we got there) you need a directory entry in httpd.conf with an
options auth allowance or you wont get nothing happening (it'll write the stuff
to the db but you wont get auth on it)
I think I've covered it all here. Drop me a line if you get stuck and I'll give
you a hand. I do admit (quite freely) that this ain't as simple as it should be.
I don't always write deliberately broken code. Try a search on whois and you'll
see what I mean (drop-in domain finder)