PHP Classes

File: example.php

Recommend this page to a friend!
  Classes of Juan Manuel  >  PHP Google Image Scraper  >  example.php  >  Download  
File: example.php
Role: Example script
Content type: text/plain
Description: example.php
Class: PHP Google Image Scraper
Get images from Google search that match a keyword
Author: By
Last change:
Date: 5 years ago
Size: 521 bytes
 

Contents

Class file image Download
<?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>'
;

?>

For more information send a message to info at phpclasses dot org.