2017 © Pedro Peláez
 

library keywordrank

A Laravel package for getting keyword positions from Google

image

seongbae/keywordrank

A Laravel package for getting keyword positions from Google

  • Sunday, January 14, 2018
  • by seongbae
  • Repository
  • 1 Watchers
  • 4 Stars
  • 40 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 1 Forks
  • 1 Open issues
  • 3 Versions
  • 14 % Grown

The README.md

Laravel Keyword Rank

A Laravel package for getting keyword position from Google. This package works with proxy service from seo-proxies dot com at the moment but the plan is to make it work with any proxy services., (*1)

Installation

Add the following line to the require section of your Laravel webapp's composer.json file:, (*2)

    "require": {
        "seongbae/KeywordRank": "1.*"
    }

Run composer update to install the package., (*3)

Or simpy run composer require seongbae/keywordrank, (*4)

This package uses Laravel 5.5 Package Auto-Discovery., (*5)

For previous versions of Laravel, you need to update config/app.php by adding an entry for the service provider:, (*6)

'providers' => [
    // ...
    seongbae\KeywordRank\KeywordRankServiceProvider::class,
];

Next, publish all package resources:, (*7)

    php artisan vendor:publish --provider="seongbae\KeywordRank\KeywordRankServiceProvider"

This will add to your project:, (*8)

- migration - database tables for storing keywords and positions/rankings
- configuration - package configurations

Remember to launch migration:, (*9)

    php artisan migrate

Next step is to add cron task via Scheduler (app\Console\Kernel.php):, (*10)

    protected function schedule(Schedule $schedule)
    {
        // ...
        $schedule->command('keywords:fetch')->daily();
    }

Usage

1) Add website and keyword:, (*11)

    $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

2) Get Google keyword position, (*12)

    $fetcher = new KeywordRankFetcher(Config::get('keywordrank'));
    $position = $fetcher->getPosition('www.lnidigital.com','Ashburn Digital Marketing',true);

3) Get Google keyword position from console command, (*13)

    php artisan fetch:rank www.lnidigital.com 'Ashburn Digital Marketing'

By default, above command uses cache if it's run more than once within 24 hours. If you don't want to use cache, for testing purpose for example, you can add '--nocache' optional argument at the end., (*14)

Changelog

1.0 - Create package, (*15)

Roadmap

  • Make the package work with any other proxy services

Credits

This package is created by Seong Bae. The package utilizes free Google Rank Checker at http://google-rank-checker.squabbel.com/ and simple dom parser at https://github.com/sunra/php-simple-html-dom-parser., (*16)

The Versions

14/01 2018

dev-master

9999999-dev

A Laravel package for getting keyword positions from Google

  Sources   Download

MIT

The Requires

 

The Development Requires

by Seong Bae

laravel console search google keywords rank

14/01 2018

1.0.1

1.0.1.0

A Laravel package for getting keyword positions from Google

  Sources   Download

MIT

The Requires

 

The Development Requires

by Seong Bae

laravel console search google keywords rank

14/01 2018

1.0

1.0.0.0

A Laravel package for getting keyword positions from Google

  Sources   Download

MIT

The Requires

 

The Development Requires

by Seong Bae

laravel console search google keywords rank