The question is quite simple. I'm able to parse image from Google Images website by using the following code:
$search_keyword=str_replace(' ','+',$search_keyword);
$newhtml =file_get_html("https://www.google.com/search?q=".$search_keyword."&tbm=isch");
$result_image_source = $newhtml->find('img');
foreach($result_image_source as $div) {
echo '<img src="'.$div->src.'">';
}
but I only get encrypted images, that is I got the right images but in a very small size. How can I scrape the real size images, instead? The code works in PHP with Simple HTML DOM Parser.
Thanks
Why not use the Google Image Search API to get image results in a nice JSON object instead of scraping them?
https://developers.google.com/image-search/v1/jsondevguide?hl=en#json_snippets_php