Google page rank checker - PHP library for building SEO tools
This repository it is tool set for free using.
The recommended way to install google_rank_checker
is through composer.
Try install Composer from https://getcomposer.org/download/ first and use command:
$ php composer.phar install
If you need checking for keyword for domain you need below PHP code:
<?php
namespace Grc\Example;
require __DIR__ . '/../vendor/autoload.php';
use \Grc\Http\GuzzleHttpClient;
use \Grc\RankChecker\Google\Google;
$url = 'bieli.net';
if ($_SERVER['argc'] > 1) {
$url = trim($_SERVER['argv'][1]);
}
$httpClient = new GuzzleHttpClient();
try
{
$grc = new Google($httpClient);
$grc->setKeyword('marcin bielak');
$grc->setUrl($url);
$grc->setSearchDomain('google.pl');
$grc->check();
echo $grc->getPageRank();
}
catch (\Exception $exception)
{
printf("[ ERROR ] Exception '%s': '%s'\n", get_class($exception), $exception->getMessage());
}
$ php src/example.php github.com
8
$ php ./vendor/phpunit/phpunit/phpunit tests/