ropendev / google
Google Helper to Hack serp
Installs: 143
Dependents: 1
Suggesters: 0
Security: 0
Stars: 1
Watchers: 3
Forks: 1
Open Issues: 0
Language:HTML
Requires
- ropendev/cache: ^1.1
- ropendev/curl: ^1.0
- ropendev/simple_html_dom: ^1.7
Requires (Dev)
- friendsofphp/php-cs-fixer: ^3.0
- phpunit/phpunit: ^7.5
- symfony/debug: ^4.4
- symfony/var-dumper: ^5.2
- vimeo/psalm: ^4.7
README
Few PHP classes to manage request on Google Web Search & co.
use rOpenDev\Google\SearchViaCurl; use rOpenDev\Google\TestProxy; use rOpenDev\Google\SafeBrowsing; $Google = new SearchViaCurl('my kw'); $Google->setProxy('monproxie:monport:username:password') ->setTld('com') ->setLanguage('en') ->setSleep(6) // to wait between 2 requests on Google ->setCacheFolder(null) // to disable storing in the /tmp folder //->setCacheExpireTime(86400) // 1 Day ->setNbrPage(10) // Nbr de page à extraire ->setParameter('num', 100) // to add a parameter in the search url ; /** * @return array of array containing type, title, link values */ $Google->extractResults(); // Delete cache files $Google->deleteCacheFiles(); /** * @return int */ $Google->getNbrResults() /** * @return string explaining the error */ $Google->getError(); // $Google->cErrors contains curl errors /* return an array */ TestProxy::go('monrpoxu'); // @return bool SafeBrowsing::get('https://piedweb.com');// @return bool
QWANT
Design for the contest qwanturank.
use rOpenDev\Qwant\QwantSearchViaCurl; $Qwant = new QwantSearchViaCurl('qwanturank'); /** * @return array of array containing type, title, link values */ $Qwant->extractResults();
Contribute
Check coding standards before to commit : php-cs-fixer fix src --rules=@Symfony --verbose && php-cs-fixer fix src --rules='{"array_syntax": {"syntax": "short"}}' --verbose
Contributors
- Pied Web
- ...
License
MIT (see the LICENSE file for details)