PHP Classes

PHP Google Custom Search API: Search for keywords using Google Custom Search API

Recommend this page to a friend!
     
  Info   Example   View files Files   Install with Composer Install with Composer   Download Download   Reputation   Support forum   Blog    
Ratings Unique User Downloads Download Rankings
StarStarStar 58%Total: 1,896 This week: 1All time: 2,077 This week: 38Up
Version License PHP version Categories
google-custom-search 1.0.0GNU General Publi...5.4PHP 5, Searching, Web services
Description 

Author

This class can search for keywords using Google Custom Search API.

It can send HTTP requests to the Google Custom Site Search API Web server to search for given keywords. All search API parameters can be configured.

The class returns an object with the decoded search results.

Innovation Award
PHP Programming Innovation award nominee
December 2014
Number 8


Prize: One copy of VS.PHP
The Google Custom Search API is an API that allows external applications perform searches using the Google search engine.

This class can perform arbitrary searches on Google using its custom search API.

Manuel Lemos
Picture of Jacob Fogg
  Performance   Level  
Name: Jacob Fogg <contact>
Classes: 7 packages by
Country: United States United States
Age: 44
All time rank: 1047148 in United States United States
Week rank: 49 Up6 in United States United States Up
Innovation award
Innovation award
Nominee: 3x

Winner: 1x

Recommendations

Multiple search engine search retrieval and storage
Need a engine to query different search engines

Google custom search api
Connect google search API to my software

Parse Google search results
Get Google results in an array

Google custom search engine using the API
Google Custom Search engine using the API in PHP

Example

<?php
use Fogg\Google\CustomSearch\CustomSearch;
require
'CustomSearch.php';

//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']);


  Files folder image Files (2)  
File Role Description
Files folder imageFogg (1 directory)

  Files folder image Files (2)  /  Fogg  
File Role Description
Files folder imageGoogle (1 directory)

  Files folder image Files (2)  /  Fogg  /  Google  
File Role Description
Files folder imageCustomSearch (2 files)

  Files folder image Files (2)  /  Fogg  /  Google  /  CustomSearch  
File Role Description
  Plain text file CustomSearch.php Class Primary class file.
  Accessible without login Plain text file example.php Example An example

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,896
This week:1
All time:2,077
This week:38Up
 User Ratings  
 
 All time
Utility:83%StarStarStarStarStar
Consistency:83%StarStarStarStarStar
Documentation:-
Examples:83%StarStarStarStarStar
Tests:-
Videos:-
Overall:58%StarStarStar
Rank:1515