1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Content Masking - Help please

Discussion in 'Black Hat SEO' started by iamsgf, Jan 10, 2009.

  1. iamsgf

    iamsgf Regular Member

    Joined:
    Oct 6, 2008
    Messages:
    307
    Likes Received:
    268
    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.
     
  2. zongoneri

    zongoneri Junior Member

    Joined:
    Jun 2, 2008
    Messages:
    107
    Likes Received:
    42
    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.
     
  3. iamsgf

    iamsgf Regular Member

    Joined:
    Oct 6, 2008
    Messages:
    307
    Likes Received:
    268
    Nah, dont want it in a frame, because then when code is validate by my system it cannot read into the frame.
     
  4. iamsgf

    iamsgf Regular Member

    Joined:
    Oct 6, 2008
    Messages:
    307
    Likes Received:
    268
    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 ?>