Services_Google
[ class tree: Services_Google ] [ index: Services_Google ] [ all elements ]

Source for file example1.php

Documentation is available at example1.php

  1. <?php
  2. require_once("Services/Google.php");
  3.  
  4. $key "KEY HERE";
  5.  
  6. // Create the object
  7. $google = new Services_Google($key);
  8.  
  9. // Setup query options, in this case limit to 100 results total.
  10. $google->queryOptions['limit'= 100;
  11.  
  12. // Run the search
  13. $google->search("PEAR");
  14.  
  15. // Loop through the results, $google->fetch() will return false once
  16. // it reaches the 100th result, or no more results are available.
  17. foreach($google as $key => $result{
  18.     echo $key."\t".$result->title."\n";
  19. }
  20. ?>

Documentation generated on Mon, 11 Mar 2019 15:17:56 -0400 by phpDocumentor 1.4.4. PEAR Logo Copyright © PHP Group 2004.