PHP Classes

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

Recommend this page to a friend!
  Info   View files Example   View files View files (2)   DownloadInstall with Composer Download .zip   Reputation   Support forum (1)   Blog    
Ratings Unique User Downloads Download Rankings
StarStarStar 58%Total: 1,893 All time: 2,085 This week: 84Up
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: 1048147 in United States United States
Week rank: 195 Up28 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  
File Role Description
Files folder imageFogg (1 directory)

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

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

  Files folder image Files  /  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

 Version Control Unique User Downloads Download Rankings  
 0%
Total:1,893
This week:0
All time:2,085
This week:84Up
 User Ratings  
 
 All time
Utility:83%StarStarStarStarStar
Consistency:83%StarStarStarStarStar
Documentation:-
Examples:83%StarStarStarStarStar
Tests:-
Videos:-
Overall:58%StarStarStar
Rank:1514