xp-forge/google-search

This package is abandoned and no longer maintained. No replacement package was suggested.

Google Websearch Protocol

v6.0.0 2018-02-05 20:17 UTC

This package is auto-updated.

Last update: 2020-08-29 04:09:28 UTC


README

Build Status on TravisCI XP Framework Module BSD Licence Required PHP 5.5+ Supports PHP 7.0+ Supports HHVM 3.4+ Latest Stable Version

Google Websearch Protocol. See http://www.google.com/cse/docs/resultsxml.html

Example

use com\google\search\custom\GoogleSearchClient;
use util\cmd\Console;

$client= new GoogleSearchClient('http://gsa23.enterprisedemo-google.com/search');
$response= $client->searchFor((new GoogleSearchQuery())
  ->withTerm('test')
  ->startingAt(10)
);

Console::writeLinef('Searching for "test" took %3.f second(s)', $response->getTime());
Console::writeLine('Results: ', $response->getResultSet());

API

$ xp mirror com.google.search.custom
@FileSystemCL<./src/main/php>
@FileSystemCL<./src/test/php>
package com.google.search.custom {
  package com.google.search.custom.types
  package com.google.search.custom.unittest

  public class com.google.search.custom.GoogleSearchClient
  public class com.google.search.custom.GoogleSearchQuery
}