PHP Classes

File: samples/suggestion.php

Recommend this page to a friend!
  Classes of Juraj Puchký   PHP Search Analytics Utilities   samples/suggestion.php   Download  
File: samples/suggestion.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: 2 years ago
Size: 541 bytes
 

Contents

Class file image Download
<?php

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

use
BABA\Search\Analyzers\Suggestion;
use
BABA\Search\Engines\Google;


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