Skip to content

Send event data from your PHP application to tirreno open-source security framework.

License

Notifications You must be signed in to change notification settings

tirrenotechnologies/tirreno-php-tracker

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

tirreno PHP tracker library

This is the official PHP implementation of the tirreno Tracking API.

<?php

// Load object
require_once("TirrenoTracker.php");

$tirrenoUrl = "https://example.tld/sensor/"; // Sensor URL
$trackingId = "XXX"; // Tracking ID

// Create object
$tracker = new TirrenoTracker($tirrenoUrl, $trackingId);

// Override defaults of required params
$tracker->setUserName("johndoe42")
        ->setIpAddress("1.1.1.1")
        ->setUrl("/login")
        ->setUserAgent("Mozilla/5.0 (X11; Linux x86_64)")
        ->setEventTypeAccountLogin();

// Set optional params
$tracker->setFirstName("John")
        ->setBrowserLanguage("fr-FR,fr;q=0.9")
        ->setHttpMethod("POST");

// Track event
$tracker->track();

Requirements

  • cURL PHP extension

Installation

Composer

composer require tirreno/tirreno-tracker

Manualy

Via file download.

require_once("TirrenoTracker.php");

License

Released under the BSD License. tirreno is a registered trademark of tirreno technologies sàrl, Switzerland.

About

Send event data from your PHP application to tirreno open-source security framework.

Topics

Resources

License

Stars

Watchers

Forks

Languages