PHP Classes

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

Recommend this page to a friend!
  Info   View files Example   Demos   Screenshots Screenshots   View files View files (2)   DownloadInstall with Composer Download .zip   Reputation   Support forum (6)   Blog (1)    
Ratings Unique User Downloads Download Rankings
StarStarStar 50%Total: 1,088 This week: 1All time: 3,433 This week: 571Up
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
Age: 52
All time rank: 225254 in Spain Spain
Week rank: 420 Up10 in Spain Spain Up

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  
  • image.jpeg
  Files folder image Files  
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.

 Version Control Unique User Downloads Download Rankings  
 0%
Total:1,088
This week:1
All time:3,433
This week:571Up
User Ratings User Comments (3)
 All time
Utility:65%StarStarStarStar
Consistency:87%StarStarStarStarStar
Documentation:-
Examples:93%StarStarStarStarStar
Tests:-
Videos:-
Overall:50%StarStarStar
Rank:2556
 
Great Package, Works better than simple html dom!
2 years ago (Soliman Elgammal)
70%StarStarStarStar
Great Package, Works better than simple html dom!
2 years ago (Soliman Elgammal)
70%StarStarStarStar
good class , thanks
4 years ago (JuanMa Miras Martinez)
70%StarStarStarStar