Download the PHP package drsoft28/visitor-tracker without Composer

On this page you can find all versions of the php package drsoft28/visitor-tracker. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package visitor-tracker

Laravel Visitor Tracker - Full User Guide

The Laravel Visitor Tracker package allows you to track guest and user activity on your web application. It provides detailed information about visitors, including their IP address, location, visited URLs, and more. This guide will walk you through the installation, configuration, and usage of the package.


Table of Contents

  1. Installation
  2. Configuration
  3. Middleware Setup
  4. Usage
  5. Database Structure
  6. Model Methods
  7. Customization
  8. Troubleshooting

Installation

  1. Install the package via Composer:

  2. Publish the configuration file and migrations:

    Or

    This will create:

    • A visitortracker.php file in the config/ directory.
    • A migration file for the visitor_trackers table in the database/migrations/ directory.
  3. Run the migration to create the visitor_trackers table:

Configuration

After publishing the configuration file, you can customize the package behavior by editing the config/visitortracker.php file. Here are the default options:


Middleware Setup

To start tracking visitors, you need to add the VisitorTrackerMiddleware to your application's middleware stack.

For Laravel 10 and Below:

Add the middleware to the web group in app/Http/Kernel.php:

For Laravel 11 and Above:

Add the middleware in bootstrap/app.php:


Usage

Once the middleware is enabled, the package will automatically track visitors and store their information in the visitor_trackers table.

Default Model

By default, the package uses the \Drsoft28\VisitorTracker\Models\VisitorTracker model. You can change this in the visitortracker.php configuration file.

Database Columns

The visitor_trackers table contains the following columns:


Model Methods

The VisitorTracker model provides the following methods for querying visitor data:

  1. visitorsWithinSeconds($seconds):

    • Retrieve visitors who visited within the last $seconds seconds.
  2. visitorsWithinMinutes($minutes):

    • Retrieve visitors who visited within the last $minutes minutes.
  3. visitorsWithinHours($hours):
    • Retrieve visitors who visited within the last $hours hours.

Example Usage:


Customization

Custom Model

If you want to use a custom model for tracking visitors, follow these steps:

  1. Create a new model in your app/Models directory:

  2. Update the visitortracker.php configuration file to use your custom model:

Custom Headers

You can customize the headers tracked in the request_info column by updating the headers array in the visitortracker.php configuration file.


Troubleshooting

  1. Middleware Not Tracking Visitors:

    • Ensure the middleware is added to the correct group (web or global).
    • Verify that the middleware is not being skipped by other middleware.
  2. Migration Errors:

    • Ensure the visitor_trackers table does not already exist before running the migration.
    • Check for any typos in the migration file.
  3. Configuration Not Applied:
    • Clear the configuration cache after updating the visitortracker.php file:

Support

If you encounter any issues or have questions, please open an issue on the GitHub repository.


Thank you for using Laravel Visitor Tracker! 🚀


All versions of visitor-tracker with dependencies

PHP Build Version
Package Version
Requires jaybizzle/crawler-detect Version ^1.3
stevebauman/location Version ^7.5
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package drsoft28/visitor-tracker contains the following files

Loading the files please wait ...