xp-forge / google-search
Google Websearch Protocol
Installs: 23 678
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 7
Forks: 0
Open Issues: 0
Requires
- php: >=5.5.0
- xp-framework/core: ^9.0 | ^8.0 | ^7.0 | ^6.5
- xp-framework/http: ^9.0 | ^8.0 | ^7.0 | ^6.0
- xp-framework/xml: ^9.0 | ^8.0 | ^7.0 | ^6.0
Requires (Dev)
- xp-framework/unittest: ^9.0 | ^8.0 | ^7.0 | ^6.5
README
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 }