PHP code example of domatskiy / visitor-source

1. Go to this page and download the library: Download domatskiy/visitor-source 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/ */

    

domatskiy / visitor-source example snippets


use Domatskiy\VisitorSource;

$VisitorSource = VisitorSource::getInstance();
$source = $VisitorSource->getSource();

if($source->getSource() == VisitorSource\Source::SOURCE_CONTEXT)
{
    // is context
}