This is a really basic cloaking script – it cloaks the googlebot useragent so you can serve one type of content to the google bots, and a different type to your visitors.
OK, so quickly, what is cloaking?
Cloaking is, in a nutshell, serving one piece of content to one person, and another piece of content to someone else, based on predetermined factors.
Despite what Google would have you believe, not all cloaking is evil. Google actually do it themselves when they direct those of us outside the US to our local version of their search engine (google.com.au for me here in Oz) (more…)