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

[Trick] Don't let Google images steal your images! check out my method to prevent that

Discussion in 'Black Hat SEO' started by mrblackjack, Mar 5, 2013.

  1. mrblackjack

    mrblackjack Jr. VIP Jr. VIP Premium Member

    Joined:
    Dec 6, 2011
    Messages:
    960
    Likes Received:
    552
    Occupation:
    I live alone, I work alone, I make money alone
    Location:
    G00gle LaNd
    ok, guys. you'll probably remember the good ol' days when we used a frame breaker to prevent Google images from presenting our website images to surfers who don't intend to visit our site.
    Now, after Google had changed their algo, and the frame breaker doesn't work anymore. here's my blackhat solution to Google. Guys, check this out:
    http://www.google.co.il/search?q=si...-for-endless-google-images-traffic%2F;447;443


    How I did this?
    in a minute,
    bear in my mind that you don't have to be as extreme as I did, but you obviously can use an opaque image that will have a note saying: "click here to view the full image" etc. thus pointing the visitor to your website and preventing Google from stealing your traffic/


    The Method:
    it's very technical so stay tuned.


    requirements:
    Server: apache
    language code: PHP


    let's start:
    1. u need to put all the images you would like to hide from Google in one directory - let's say: /images
    2. u need to create another directory - named: /script-images for ex.
    3. create an .htaccess file in directory /script-images and put the following code in it:
    Code:
    AddHandler application/x-httpd-php5 .php .png
    
    This code tells apache to treat .png files as .php files. you can use obviously whatever image file you want in your htaccess or use them all like this: .png | .jpg | .gif etc.
    4. in directory /script-images create images files replicated from directory /images. So. for example, if you had three images in directory /images named: background.png, wall.png, and banner.png, you should create such files under the same name in directory /script-images. simply click on: create new file in your c-panel, and name each file as the image files found in /images.


    Now, so far we have:
    1. your real images in directory /images
    2. empty file names named after your images in directory /script-images.


    now, for each empty file found in directory /script-images, put the following php code:



    pay attention to the path of the variable $remoteFile it should point to the real image found in directory /images


    for example,
    if I had an "image" file (which contains the php code just above) named: background.png in directory /script-images, the $remoteFile value should be the path to the parallel real image name found in directory /images, that is: background.png.


    Now, check out the first part of the code, mainly:


    Code:
    // check the refererr, 
        if(strstr($_SERVER['HTTP_REFERER'], 'google')){
            // if the referer is Google
            $remoteFile = 'http://www.your-domain.com/put-here-an-image-for-google.png';
        }else{
            // path to your real image - for real users
            $remoteFile = 'http://www.your-domain.com/images/realImage.png';
        }
    

    it checks whether the referer is Google. and if it is, $remoteFile value will contain path to an image for Google to see (as shown in my eample above). users, will see the real image


    Finally, when you use images in your websites, whether in <img> tags or CSS, use the path to the /script-images, like this: http://www.my-domain.com/script-images/background.png what will happen is, the server will call the real image file and present it only to users who's referer is doesn't contain Google. in our case, Google images


    Hope you'll find this useful


    Good luck

    PS, a quick update:
    you need to set the correct header and php function for each image type, that is, in my example, I showed a .png tyoe image, but if you want to manipulate a JPG for ex, set the following values to the beneath code lines (pay attention to the red colored)

    for JPG images:
    Code:
    header("Content-Type: image/[COLOR=#ff0000][B]jpeg[/B][/COLOR]");
        header("Expires: " . gmdate('D, d-M-Y H:i:s \G\M\T', time() + 200 * 200 * 200));
    
    
        $image = imagecreatefrom[COLOR=#ff0000][B]jpeg[/B][/COLOR]($remoteFile);  
        
    
    for GIF images:
    Code:
    header("Content-Type: image/[COLOR=#ff0000][B]gif[/B][/COLOR]");
         header("Expires: " . gmdate('D, d-M-Y H:i:s \G\M\T', time() + 200 * 200 * 200));
     
     
         $image = imagecreatefrom[COLOR=#ff0000][B]gif[/B][/COLOR]($remoteFile);  
         
    
     
    • Thanks Thanks x 3
  2. R0meo

    R0meo Senior Member

    Joined:
    Nov 5, 2011
    Messages:
    839
    Likes Received:
    370
    Occupation:
    Authority builder!
    Location:
    Lithuania
    internet already filled with "click to view in full size" "click to view in HD" "click to start gallery" etc
     
  3. hpasha

    hpasha Jr. VIP Jr. VIP

    Joined:
    May 15, 2011
    Messages:
    1,187
    Likes Received:
    179
    Location:
    Kepler 186F
    well I never mind if Google just copy the photos on my site. It will derive some free traffic.
     
  4. daffy

    daffy Regular Member

    Joined:
    Dec 2, 2008
    Messages:
    276
    Likes Received:
    922
    Occupation:
    Student
    Location:
    Buffalo, NY / Hyderabad, India / Irvine, CA
    great.. come at me GI!
     
  5. acotut

    acotut Elite Member

    Joined:
    Dec 1, 2010
    Messages:
    2,294
    Likes Received:
    1,040
    Gender:
    Male
    Home Page:
    Yea,unless that traffic is useless...
     
  6. mrblackjack

    mrblackjack Jr. VIP Jr. VIP Premium Member

    Joined:
    Dec 6, 2011
    Messages:
    960
    Likes Received:
    552
    Occupation:
    I live alone, I work alone, I make money alone
    Location:
    G00gle LaNd
    you're partially right since a user can watch your images from the Google images search results and not necessarily visit your site. With this method, you assure he/she will visit your site.
     
  7. toolsavvy

    toolsavvy Newbie

    Joined:
    Dec 10, 2014
    Messages:
    29
    Likes Received:
    0
    Wow! I never thought of Googl images as a traffic steal, but you're right. Never crossed my mind, really. That's why the folks on this forum are so valuable. But I'm getting info overload the longer I read the threads...lol.
     
  8. jon_xx_x

    jon_xx_x Jr. VIP Jr. VIP

    Joined:
    Nov 15, 2008
    Messages:
    3,114
    Likes Received:
    1,458
    If you never succeed in your online journeys atleast you can always remember that time you bumped a two year old post.
     
    • Thanks Thanks x 1
  9. roadhamster

    roadhamster Regular Member

    Joined:
    Mar 12, 2012
    Messages:
    300
    Likes Received:
    226
    Nice plan, but there should be an easier way to do it for, let's say 200,000 images. I don't wanna make a seperate file for each image...
    Got some code for that?
     
  10. RuthSam

    RuthSam Jr. VIP Jr. VIP Premium Member

    Joined:
    Mar 19, 2010
    Messages:
    3,351
    Likes Received:
    832
    Gender:
    Male
    Home Page:
    I totally agree :D
     
  11. webhr88

    webhr88 Registered Member

    Joined:
    Jan 25, 2015
    Messages:
    50
    Likes Received:
    1
    The links looks like not opening in my browser
     
  12. kaptain1

    kaptain1 Junior Member

    Joined:
    Jan 30, 2015
    Messages:
    102
    Likes Received:
    16
    Occupation:
    Freelance
    cool for small number of files but it will break the server down if we talk about hundred thousands
     
  13. darazpk

    darazpk Newbie

    Joined:
    Mar 1, 2015
    Messages:
    16
    Likes Received:
    0
    Thanks for the share, it does look quite technical though. Important if you treasure your images.
     
  14. Mountain Man

    Mountain Man Junior Member

    Joined:
    Mar 17, 2015
    Messages:
    110
    Likes Received:
    20
    thanks for the laugh