Forum Moderators: open
Thanks!
You would include() a module at the top of each page (before any other output is made so PHP can send headers) that would handle the cloaking.
First, it would check to see if the visitor is a registered user by looking for a cookie. If a cookie is found, the module exits and the page is displayed.
If no cookie is found, the module checks the IP address and/or User-Agent of the visitor to see if it belongs to an approved search engine. If it does, the module exits and the rest of the page is displayed.
If the visitor is not a search engine spider, and has no cookie, they are sent a header to redirect them to the login page, then the module exits.
There are existing PHP scripts that can handle the search engine spider identification portion and redirection parts, both commercial and free, but I don't want to link to them publicly.