Content Masking - Help please

iamsgf

Regular Member
Joined
Oct 6, 2008
Messages
307
Reaction score
271
Hi all,

I want to mask some of my site content from G without stopping the page being spidered. ie spider crawls the site and see's all less for a paragraph that i dont want it to see.

Anyone know of come script that will do this for me?

Thanks in Advance.
 
i dont know if it works to you but you can frame the part you wont want G to see and put on htacess a deny robots.
 
Nah, dont want it in a frame, because then when code is validate by my system it cannot read into the frame.
 
For anyone that looked at this thread and thought they would find the same sort of thing useful, here is the code:

Code:
<?php $ua = $_SERVER['HTTP_USER_AGENT']; $bot = preg_match("@(Googlebot/\d|Yahoo! Slurp;|msnbot/\d)@", $ua);
?>

<?php if (!$bot): ?> ##Elements to be hidden here <?php endif ?>
 
Back
Top