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

How can i grab pictures from google images?

Discussion in 'Cloaking and Content Generators' started by bolanka, May 21, 2011.

  1. bolanka

    bolanka Newbie

    Joined:
    Feb 14, 2010
    Messages:
    42
    Likes Received:
    6
    Hi friends. I have a picture site. How can i grab pics from google images? Is there any plugin or bot for this?

    I have

    AutoBlogged_2574
    Caffeinated_Content_Management_v.335
    wp-o-matic.1.0RC4
    wp_robot_v3.10

    But I cant. Wp robot isnt finding any result. I couldnt find any .rss about these pictures?

    Thanks...
     
  2. PresFox

    PresFox Registered Member

    Joined:
    Jan 9, 2010
    Messages:
    97
    Likes Received:
    5
  3. TheEditor

    TheEditor Regular Member

    Joined:
    Aug 20, 2007
    Messages:
    425
    Likes Received:
    206
    Not hard to do in a PHP script.
     
  4. sirgold

    sirgold Supreme Member

    Joined:
    Jun 25, 2010
    Messages:
    1,260
    Likes Received:
    645
    Occupation:
    Busy proving the Pareto principle right
    Location:
    A hot one
    You need to code (have coded) a php script that preferably makes use of curl. The multi interface is able to send concurrent requests as in a multi-threaded environment, but from a simple web page, that's pretty neat and cozy if you have to harvest a LOT of them.
     
  5. redstone.1337

    redstone.1337 BANNED BANNED Jr. VIP Premium Member

    Joined:
    Dec 30, 2009
    Messages:
    1,259
    Likes Received:
    999
    Here it goes. I don't remember where but I found it somewhere on the web and have been using it for one of my project.

    To get the results run the following in PHP and it will return back the link of images in array. Then you can use file_get_contents() to get the image from its URL and then save it to on your server. Not too hard. If you don't know PHP then hire some guy, not a hard task.

    Usage:

    PHP:
    imageSearch("keyword here");
    Following contains the function and class, make sure to include it.

    PHP:
    function imageSearch($query) {
        
        
    $image_data object_to_array(googleImageSearch($query));
        foreach(
    $image_data as $image_obj) {
            
    $image_array object_to_array($image_obj);
            
    $image_links[] = $image_array['source'];
        }
        return 
    $image_links;
    }

    function 
    object_to_array($data) {
      if(
    is_array($data) || is_object($data))  {
        
    $result = array(); 
        foreach(
    $data as $key => $value) { 
          
    $result[$key] = object_to_array($value); 
        }
        return 
    $result;
      }
      return 
    $data;
    }

    // Image sizes
    define ('GIS_LARGE''l');
    define ('GIS_MEDIUM''m');
    define ('GIS_ICON''i');
    define ('GIS_ANY''');

    // Image types
    define ('GIS_FACE''face');
    define ('GIS_PHOTO''photo');
    define ('GIS_CLIPART''clipart');
    define ('GIS_LINEART''lineart');

    function 
    googleImageSearch ($query$page 1$size GIS_ANY$type GIS_ANY)
    {

        
    $retVal = array();

        
    // Get the search results page
        
    $response file_get_contents('http://images.google.com/images?hl=en&q=' urlencode ($query) . '&imgsz=' $size '&imgtype=' $type '&start=' . (($page 1) * 21));
        
        
    // Extract the image information. This is found inside of a javascript call to setResults
        
    preg_match('/dyn.setResults\(\[(.*?)\]\);/is'$response$match);
        
        if (isset(
    $match[1])) {
            
            
    // Grab all the arrays
            
    preg_match_all('/\[(.*?)\"\]/'$match[1], $m);
            
            foreach (
    $m[1] as $item) {
                
    // Explode on each paramter (comma delimeter)
                
    $item urldecode(str_replace('\x''%'$item));
                
    preg_match_all('/\"(.*?)\"/'$item$params);
                
                
    // Check for more than one paramter. Not sure why, but there seem to be empty array sets between actual results
                
    if (count($params[1]) > 0) {
                    
                    
    $params $params[1];
                    
                    
    // Important array indices
                    // 0  - Link to Google image result. This is the page that displays when you click a result through normal image search
                    // 3  - URL of source image
                    // 4  - Width of the thumbnail image
                    // 5  - Height of the thumbnail image
                    // 6  - Title of the image
                    // 9  - Width, height and size of the image (In the format of 'width Ã— height - size')
                    // 10 - Image type
                    // 11 - Originating domain
                    // 18 - URL of google's thumbnail
                    
                    
    preg_match('/([\d]+) Ã— ([\d]+) - ([\d]+)/'$params[9], $dimensions);
                    
    $t null;
                    
    $t->resultLink 'http://images.google.com' $params[0];
                    
    $t->source $params[3];
                    
    $t->title $params[6];
                    
    $t->width $dimensions[1];
                    
    $t->height $dimensions[2];
                    
    $t->size $dimensions[3];
                    
    $t->type $params[10];
                    
    $t->domain $params[11];
                    
    $t->thumb null;
                    
    $t->thumb->src $params[18];
                    
    $t->thumb->width $params[4];
                    
    $t->thumb->height $params[5];
                    
    $retVal[] = $t;
                    
                }
            }
            
        }
        
        return 
    $retVal;
        
    }

     
    • Thanks Thanks x 1
  6. MrSofteeMan

    MrSofteeMan Newbie

    Joined:
    Jun 5, 2011
    Messages:
    14
    Likes Received:
    1
    Very nice share. This will help me learn some PHP :)
     
  7. frogmelter

    frogmelter Newbie

    Joined:
    Apr 5, 2011
    Messages:
    38
    Likes Received:
    0
    Doesn't scrapebox have a function to do this in one of the add ons?
     
  8. mark1120

    mark1120 Newbie

    Joined:
    May 27, 2011
    Messages:
    2
    Likes Received:
    1
    You want to know a sleazy, eazy way to create huge websites for free?

    What I do is visit the torrent sites like the Pirate Bay, download the e-books that have a lot of hits. (Most are self-help psychological babble like: "How to Make People Like You In 90 Secs.
    That's 1 of 'em I got today.) Now I can do 1 of 3 things: I can either copy the book in its entirety and put it on a multi-page website, OR I can copy the ebook in its entirety and put it on an on-going blog page, OR I can copy parts of the book (like a few pages) and create a blog a piece for them.

    Afterwards I'll buy the $1.99 domains. Every now and then, I'll be cheap or lazy, and just use a sub-domain of one of the popular web creation services. (I recently did the latter off of Weebly for a Page Rank website. This site I actually spent a few hours a night making. For being live 7 days now, it's already on 4 popular keyword queries: 'page rank info, pagerank info, page rank secrets, pagerank secrets (here the dots are replaced with commas because I'm supposedly spamming by giving this example (page-rank, weebly, the commercial TLD to end this)...it hasn't found its way to Google yet...it's only on Bing and Yahoo at the moment.) This Weebly sub-domain site I just made is on their (Yahoo & Bing) SERPs 8 times (4 X 2) on page 1 or 2, even out-placing Alexa a few times.

    Sorry...I'm getting off track. Other than the example I have provided, I'll take these domains I bought and find server hosts spread out through the world. For one blog page, I'll purchase space for that blog on a server far away from my main website. Once these blogs are up and running, each of these blogs will link to one of my main site's pages, essentially fooling the bot to think my main site's getting linked from all over the world and getting linked multi-page numerous times.

    As a result of doing what I just mentioned (I'm not going to repeat it again) my Page Rank for the affiliate site (main site) is 8. My placement on Google's SERP is #2, page 1 (most of the time). It has only been up and running 5 months, beating the 10-year old 'authority' sites for a very popular merchandise keyword.

    What I just explained was a doorway page that anyone can do. This is the best way to achieve dominance both page rank wise and SERP wise. You have to consider what you're giving up compared to what you're gaining in this scenario.

    It's true...there are much faster ways to get your site listed quick. I've tried them all and have decided which one is the best - the way I just described.

    Now, my site isn't kicked off of Google 3 months later as it used to all the time. True, I do run into duplicate content sometimes, BUT rarely. Why? The main way Google determines if a site is 100% duplicated or not is by the outgoing links from that site. Change the links and Google thinks it's similarly related content (instead of duplicate content-there's a difference between the two).

    If you're still skeptical, change the verbs too. The verbs are the second thing duplicate content databases look at. ie CopyScape

    As of this writing I have 3 PR 8 sites, 1 PR 7 site, 8 PR 4 sites, 17 PR 2 sites, and 27 PR 1 sites, and 212 sites sitting somewhere on the first or second page of the SERP's for Google, Bing and/or Yahoo. If you're wondering how, look at my site I posted above and see how. (read below first)

    F*** everything else on this forum. What I just told you is the blueprint to getting your affiliate ads out there.

    What you put into it is what you'll get out of it. (I know that's a niche saying I just said but it's the bottom line.)
     
    • Thanks Thanks x 1
  9. Vkernes12

    Vkernes12 Newbie

    Joined:
    Apr 15, 2011
    Messages:
    27
    Likes Received:
    10
    Occupation:
    Currently working 9-5 brick and mortar job
    Location:
    California

    that's one epic share post. damn good stuff
     
  10. adbox

    adbox Power Member

    Joined:
    May 1, 2009
    Messages:
    658
    Likes Received:
    107
    Home Page:
    BlogSense makes use of Google Images Shortcodes. They work very well. Better than flickr.

    I'm also in the process of making a new plugin that will include this. But this is due out in the Fall. : /
     
  11. kharm

    kharm Power Member

    Joined:
    Feb 9, 2009
    Messages:
    525
    Likes Received:
    97
    Occupation:
    Entrepreneurship
    use an old version of scrapebox
     
  12. jsk123

    jsk123 Newbie

    Joined:
    Apr 13, 2011
    Messages:
    18
    Likes Received:
    0
    WOW:D!! great stuff!!!:) Thanks for sharing