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

Natural Star rating trick

Discussion in 'Black Hat SEO' started by Bruut, Aug 3, 2013.

  1. Bruut

    Bruut Regular Member

    Joined:
    Aug 9, 2012
    Messages:
    227
    Likes Received:
    149
    I made this for my site and seems to work, thought some of you might want to use it :)
    It will increase your star rating slowly.. to make it seem natural to G00gle

    Place this in your page that you want the star rating to apear:
    Code:
    <?php
    $rating = "rating.txt";
    $fh = fopen($rating, 'r');
    $rating = fread($fh, filesize($rating));
    fclose($fh);
    
    
    $value = "value.txt";
    $fh = fopen($value, 'r');
    $value = fread($fh, filesize($value));
    fclose($fh);
    
    
    
    
    $random = rand(1, 50);
    if ($random == 10){
    $myFile1 = "rating.txt";
    $fh = fopen($myFile1, 'w') or die("can't open file");
    $stringData = $rating+1;
    fwrite($fh, $stringData);
    fclose($fh);
    
    
    
    
    $myFile2 = "value.txt";
    $fh = fopen($myFile2, 'w') or die("can't open file");
    $stringData = rand(6, 9);
    fwrite($fh, $stringData);
    fclose($fh);
    }
    
    
    ?>
    
    Upload this to the same directory as your page:
    Make a rating.txt with how many rating you want.
    And value.txt with a random number 6-9.


    Now place this code where you want your rating box to appear(footer i would place it)
    Code:
    <div itemscope="" itemtype="http://schema.org/Product">   <span itemprop="name">name....</span>   <div itemprop="aggregateRating" itemscope="" itemtype="http://schema.org/AggregateRating">     Rated <span itemprop="ratingValue">4.<?php echo $value;?></span>/5 based on <span itemprop="ratingCount"><?php echo $rating; ?></span> reviews</div></div>
    
    And now 1/50 visitors will "rate" your website ^^
    You can edit "$random = rand(1, 50);" and change 50 to 100 or something to make it 1/100
     
    • Thanks Thanks x 1
    Last edited: Aug 3, 2013
  2. Magicodar

    Magicodar Regular Member

    Joined:
    Jul 21, 2013
    Messages:
    266
    Likes Received:
    30
    Occupation:
    Internet Markekter
    Home Page:
    It works thanks a lot.