PHP Classes

File: Fogg/Google/CustomSearch/example.php

Recommend this page to a friend!
  Classes of Jacob Fogg   PHP Google Custom Search API   Fogg/Google/CustomSearch/example.php   Download  
File: Fogg/Google/CustomSearch/example.php
Role: Example script
Content type: text/plain
Description: An example
Class: PHP Google Custom Search API
Search for keywords using Google Custom Search API
Author: By
Last change:
Date: 8 years ago
Size: 328 bytes


Class file image Download
use Fogg\Google\CustomSearch\CustomSearch;

//Initialize the search class
$cs = new CustomSearch();

//Perform a simple search
$response = $cs->simpleSearch('whole foods');

//Perform a search with extra parameters
$response2 = $cs->search('whole foods', ['excludeTerms'=>'tomato']);