1. Go to this page and download the library: Download seongbae/keywordrank library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
protected function schedule(Schedule $schedule)
{
// ...
$schedule->command('keywords:fetch')->daily();
}
$fetcher = new KeywordRankFetcher(Config::get('keywordrank'));
$website = $fetcher->addWebsite('www.lnidigital', 'LNI Digital Marketing', 1); // last parameter is user id
$keyword = $fetcher->addKeyword($website->id, 'Ashburn Digital Marketing', 1); // last parameter is user id
$fetcher = new KeywordRankFetcher(Config::get('keywordrank'));
$position = $fetcher->getPosition('www.lnidigital.com','Ashburn Digital Marketing',true);
php artisan fetch:rank www.lnidigital.com 'Ashburn Digital Marketing'