Watching the UA header, and even maintaining a list of known
search engine IP addresses is fairly common in the porn
industry to disguise the layout of a page that makes it to
the top listing on particular keywords.
It's generally used by people who don't want someone to come
along and build a similar page that would have the same
high ranking. As such, the UA header is usless with that
goal in mind, since it obviously can be spoofed.
Anyway, some search engines despise this practice (called
"cloaking"), since some people will get "XXX Hardcore Fuxor
Pictures" listed on the keyword "Baseball" or something that
equally undermines the effectiveness of the search engine.
These engines (and I wish I had a current list) don't care
if you have a legitimate reason for cloaking, and will
ban you anyway.
More rational search engines (a group I'm sure Google
belongs in) will tolerate cloaking that doesn't impact how
well they help people find sites that match their keywords.
Check out
IP Delivery, a
poorly written perl program that sells for an absurd
amount of money to cloak pages.