ropendev/google

Google Helper 用于 Hack serp

安装: 143

依赖: 1

建议者: 0

安全: 0

星星: 1

观察者: 3

分支: 1

开放问题: 0

语言:HTML

0.0.8 2021-05-21 08:37 UTC

This package is auto-updated.

Last update: 2024-09-21 15:53:28 UTC


README

几个PHP类用于管理Google网络搜索等请求。

Google

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

qwanturank竞赛设计。

use rOpenDev\Qwant\QwantSearchViaCurl;

$Qwant = new QwantSearchViaCurl('qwanturank');

/**
 * @return array of array containing type, title, link values
 */
$Qwant->extractResults();

贡献

在提交之前检查编码标准: php-cs-fixer fix src --rules=@Symfony --verbose && php-cs-fixer fix src --rules='{"array_syntax": {"syntax": "short"}}' --verbose

贡献者

许可证

MIT(详情请见LICENSE文件)

Latest Version Software License Build Status Quality Score Total Downloads