PHP Classes

PHP Google Image Scraper: Get images from Google search that match a keyword

Recommend this page to a friend!
  Info   Example   Demos   Screenshots   View files Files   Install with Composer Install with Composer   Download Download   Reputation   Support forum   Blog    
Ratings Unique User Downloads Download Rankings
StarStarStar 50%Total: 1,091 This week: 1All time: 3,431 This week: 42Up
Version License PHP version Categories
google-image-search 1.0.0The PHP License5PHP 5, Graphics, Searching, Web services
Description 

Author

This class can can an get images from Google search that match a keyword.

It sends HTTP requests to Google Image Search Web server and retrieves the results.

The class extract the images listed in the results up to a given limit or a random number.

The extracted images can be downloaded to files in a local directory or displayed in the current page optionally.

Picture of Juan Manuel
  Performance   Level  
Name: Juan Manuel <contact>
Classes: 1 package by
Country: Spain Spain

Example

<?php

require('get_google_image.php');

if(IsSet(
$_GET['title']))
{
$google_image = new get_google_image_class;
$google_image->destination = '.'; // directory to save the images
$google_image->limit = 10; // limit the number of images, 0 for random
$google_image->display = true; // output images to the page
$google_image->GetImage($_GET['title']);
echo
'<p>Retrieved images: '.$google_image->retrieved.'</p>';
}
else
echo
'<p>Pass the title in the URL parameter like <a
href="?title=php">php</a>'
;

?>


  Get 4 images from Google ImagesExternal page  

Open in a separate window

Screenshots (1)  
  • image.jpeg
  Files folder image Files (3)  
File Role Description
Accessible without login Plain text file example.php Example example.php
Plain text file get_google_image.php Class get images from google.

The PHP Classes site has supported package installation using the Composer tool since 2013, as you may verify by reading this instructions page.
Install with Composer Install with Composer
 Version Control Unique User Downloads Download Rankings  
 0%
Total:1,091
This week:1
All time:3,431
This week:42Up
User Ratings User Comments (3)
 All time
Utility:65%StarStarStarStar
Consistency:87%StarStarStarStarStar
Documentation:-
Examples:93%StarStarStarStarStar
Tests:-
Videos:-
Overall:50%StarStarStar
Rank:2626
 
Great Package, Works better than simple html dom!
3 years ago (Soliman Elgammal)
70%StarStarStarStar
Great Package, Works better than simple html dom!
3 years ago (Soliman Elgammal)
70%StarStarStarStar
good class , thanks
5 years ago (JuanMa Miras Martinez)
70%StarStarStarStar