Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

A CodeIgniter Library for the Google AJAX API

branch: master

Fetching latest commit…

Octocat-spinner-32-eaf2f5

Cannot retrieve the latest commit at this time

Octocat-spinner-32 libraries
Octocat-spinner-32 README.textile
README.textile

CodeIgniter Google API Library

DESCRIPTION

This allows you to easily interface with Google’s AJAX API within your CodeIgniter application.

INSTALLATION

1. Copy Google.php to your application/libraries folder.
2. Load the library like normal. ($this->load->library('google');)

USAGE

API calls takes 2 parameters:
1. The search string
2. An array of options

Valid API calls include:

$this->google->web();
$this->google->local();
$this->google->video();
$this->google->blogs();
$this->google->news();
$this->google->books();
$this->google->images();
$this->google->patents();

Examples:
$this->google->web('codeigniter');

$this->google->images('cougar', array('safe' => 'active'));

Return Values

The library return the responseData object sent by Google. You must access the results like this:

$search = $this->google->web('codeigniter');
$results = $search->results;

You can also use chaining to simplify it:

$results = $this->google->web('codeigniter')->results;

For more information on the return object please see the API reference:
Google API Reference

Something went wrong with that request. Please try again.