2017 © Pedro Peláez
 

library sonar

Sonar is the site visitors monitor. Build in Phalcon & MongoDb. Conducts monitoring of visitors, using the WebSockets connection. Great for sites built on REST technology. You can easily integrate this package to track detailed information about your visitors. Check the time on each page of the site, determine device, geo location.

image

stanislav-web/sonar

Sonar is the site visitors monitor. Build in Phalcon & MongoDb. Conducts monitoring of visitors, using the WebSockets connection. Great for sites built on REST technology. You can easily integrate this package to track detailed information about your visitors. Check the time on each page of the site, determine device, geo location.

  • Thursday, October 1, 2015
  • by stanislav-web
  • Repository
  • 3 Watchers
  • 9 Stars
  • 17 Installations
  • PHP
  • 1 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 7 Versions
  • 0 % Grown

The README.md

Sonar v1.2.2-alpha

Scrutinizer Code Quality Code Coverage Build Status, (*1)

Latest Stable Version Total Downloads Latest Unstable Version License, (*2)

Sonar is the site visitors monitor. Build in Phalcon & MongoDb. Conducts monitoring of visitors, using the WebSockets connection. Great for sites built on REST technology. You can easily integrate this package to track detailed information about your visitors. Check the time on each page of the site, determine device, geo location., (*3)

ChangeLog

[v1.2.2-alpha] 2015-09-27

- add debugger (show verbose in config)
- change cache session (to shared memory)

[v1.2-alpha] 2015-09-22

- configurable error log
- add cache session (memcache)
- silent error logger (warnings & noticies)

[v1.1-alpha] 2015-09-21

- implementing geo location detector

[v1.0-alpha] 2015-09-20

- the first version of package
- socket application named as "Sonar"
- implemented:
    - tracking user's page position
    - tracking user's page timing activity
    - tracking user's device (phone, table, pc)
    - tracking the time of each page

Compatible

  • PSR-1, PSR-2, PSR-4 Standards

System requirements

  • PHP 5.5 or higher
  • Phalcon PHP extension 1.3.4 (support 2.x)
  • PHP MongoDb client extension
  • Beanstalk queue server

Installation

First update your dependencies through composer. Add to your composer.json:, (*4)

"require": {
    "stanislav-web/sonar": "dev-master",
}

Then run to update dependency and autoloader, (*5)

php composer.phar update
php composer.phar install

or just, (*6)

php composer.phar require stanislav-web/sonar dev-master

(Do not forget to include the composer autoloader), (*7)

Configuration

This package have a variety of settings, both mandatory and optional., (*8)

  1. You can select them in the global app configuration file of your Phalcon project if you will be making their to global application config. See example:

// CLI task's configuration (required) 'cli' => [ // Sonar task configuration 'sonar' => [ 'debug' => true, // verbose mode 'errors' => true, // add errors to logfile 'cache' => true, // enable cache 'errorLog' => APP_PATH.'/../logs/sonar-error.log', // queue client configurations 'beanstalk' => [ 'host' => '127.0.0.1', 'port' => 11300, ], // webscoket server configuration 'socket' => [ 'host' => '127.0.0.1', 'port' => 9003, ], // db storage configuration (Mongo) 'storage' => [ 'host' => '127.0.0.1', 'port' => 27017, 'user' => 'root', 'password' => 'root', 'dbname' => 'sonar', ] ] ];
  1. Register task in your Phalcon CLI autoloader:

$loader = new \Phalcon\Loader(); $loader->registerDirs([ ... DOCUMENT_ROOT.'vendor/stanislav-web/sonar/src/Sonar/System/Tasks' ... ]);
  1. Running socket server using CLI from your project. And tracking user thought web interface (not yet implemented):
php public/cli.php sonar

(examples of client connect you can see here), (*9)

Unit Test

Also available in /phpunit directory. Run command to start, (*10)

// Create mongo user
mongo

use sonar_test

db.createUser({
        user: "test_user",
        pwd: "test_password",
        roles: [ { role: "userAdmin", db: "sonar_test" } ]
    }
)

phpunit --configuration phpunit.xml.dist --coverage-text

or from your project root: 

phpunit --configuration ./vendor/stanislav-web/sonar/phpunit.xml.dist --coverage-text

In Future

  • More examples
  • Output working

Documents

Issues

The Versions

01/10 2015

dev-master

9999999-dev https://github.com/stanislav-web/sonar

Sonar is the site visitors monitor. Build in Phalcon & MongoDb. Conducts monitoring of visitors, using the WebSockets connection. Great for sites built on REST technology. You can easily integrate this package to track detailed information about your visitors. Check the time on each page of the site, determine device, geo location.

  Sources   Download

MIT

The Requires

 

The Development Requires

site visitor site visitor grabber users monitor phalcon mongo mongo visitors grabber site visitor monitor phalcon monitor phalcon statistics

27/09 2015

v1.2.2-alpha

1.2.2.0-alpha https://github.com/stanislav-web/sonar

Sonar is the site visitors monitor. Build in Phalcon & MongoDb. Conducts monitoring of visitors, using the WebSockets connection. Great for sites built on REST technology. You can easily integrate this package to track detailed information about your visitors. Check the time on each page of the site, determine device, geo location.

  Sources   Download

MIT

The Requires

 

The Development Requires

site visitor site visitor grabber users monitor phalcon mongo mongo visitors grabber site visitor monitor phalcon monitor phalcon statistics

22/09 2015

v1.2-alpha

1.2.0.0-alpha https://github.com/stanislav-web/sonar

Sonar is the site visitors monitor. Build in Phalcon & MongoDb. Conducts monitoring of visitors, using the WebSockets connection. Great for sites built on REST technology. You can easily integrate this package to track detailed information about your visitors. Check the time on each page of the site, determine device, geo location.

  Sources   Download

MIT

The Requires

 

The Development Requires

site visitor site visitor grabber users monitor phalcon mongo mongo visitors grabber site visitor monitor phalcon monitor phalcon statistics

22/09 2015

dev-scrutinizer-patch-2

dev-scrutinizer-patch-2 https://github.com/stanislav-web/sonar

Sonar is the site visitors monitor. Build in Phalcon & MongoDb. Conducts monitoring of visitors, using the WebSockets connection. Great for sites built on REST technology. You can easily integrate this package to track detailed information about your visitors. Check the time on each page of the site, determine device, geo location.

  Sources   Download

MIT

The Requires

 

The Development Requires

site visitor site visitor grabber users monitor phalcon mongo mongo visitors grabber

21/09 2015

v1.1-alpha

1.1.0.0-alpha https://github.com/stanislav-web/octopussy

The site visitors grabber. Build in Phalcon & MongoDb

  Sources   Download

MIT

The Requires

 

The Development Requires

site visitor site visitor grabber users monitor phalcon mongo mongo visitors grabber

20/09 2015

v1.0-alpha

1.0.0.0-alpha https://github.com/stanislav-web/octopussy

The site visitors grabber. Build in Phalcon & MongoDb

  Sources   Download

MIT

The Requires

 

The Development Requires

site visitor site visitor grabber users monitor phalcon mongo mongo visitors grabber

20/09 2015

dev-scrutinizer-patch-1

dev-scrutinizer-patch-1 https://github.com/stanislav-web/octopussy

The site visitors grabber. Build in Phalcon & MongoDb

  Sources   Download

MIT

The Requires

 

site visitor site visitor grabber users monitor phalcon mongo mongo visitors grabber