PHP Classes

File: samples/kgr.php

Recommend this page to a friend!
  Classes of Juraj Puchký   PHP Search Analytics Utilities   samples/kgr.php   Download  
File: samples/kgr.php
Role: Example script
Content type: text/plain
Description: Example script
Class: PHP Search Analytics Utilities
Find keywords to optimize pages for search engines
Author: By
Last change: google api testing
Date: 3 years ago
Size: 583 bytes
 

Contents

Class file image Download
<?php

include_once __DIR__.'/../vendor/autoload.php';

use
BABA\Search\Analyzers\KGR;
use
BABA\Search\Analyzers\Results;
use
BABA\Search\Engines\Google;


$engine = new Google();
$cache = new \BABA\Cache\Cache(new \BABA\Cache\Drivers\Disk());
if(
$engine->authentication()) {
   
$keyword = 'zdravi';
    try {
       
$results = (new KGR($engine,$cache))->getResult([$keyword], 1021, [2203], ['number-results' => 100, 'max-volume' => 250, 'min-volume' => 10,'max-ratio' => 0.25]);
       
var_dump($results);
    } catch(
Exception $e) {
        echo
"{$e->getMessage()}\n";
    }
}