Okay, here's the issue:
I have a client who has a HUGE site made up of nearly all static HTML
pages. They're now implementing a user-management system wherein
people will have to pay for content, so they'll need to log in to view
these static pages.
On top of that, there are different levels of membership, so there
will be a matrix of permissions for each area. Most importantly, the
client doesn't want to change any of their existing pages, or create
them differently in the future.
This is running on iPlanet 6.0 on Sun Sparc (Solaris 8).
Here's what I want to do (is this feasable?)
- Install PHP as NSAPI filter
- Use the predefined SAF at the Service Stage: add-header to include a PHP file
- Run all of my permissions logic / cookie checking, etc, with that PHP file
The idea here is that my PHP file will check the user's cookie, parse
the XML that includes all the permissions info, check the user and
either return true and allow the user to view the requested page, or,
if the user doesn't have rights, forward them to a log in page. This
will be running on EVERY request.
Will this work? Will this be painfully slow? This site gets millions
of views a month, and speed is important. If this doesn't work, is
there another easy way to run a PHP file before delivering any request
on the server?
Thanks! |