<?php
//phpinfo();
session_start();
//session_destroy();
//die;

     //echo '<pre>';
 
    // echo 'before';
     //print_r($_SESSION);
     //echo 'before';
    //print_r($_GET);
//      print_r($_SERVER);

        if(!empty($_GET['utm_source'])){
            $_SESSION['host'] = !empty($_SERVER['SERVER_NAME']) ? $_SERVER['SERVER_NAME'] : '';
            $_SESSION['test'] = $_SERVER['REQUEST_URI'];
            $_SESSION['count'] = $_SESSION['count'] + 1;
            $_SESSION['cid'] = !empty($_GET['cid']) ? $_GET['cid'] : '';
            $_SESSION['gclid'] = !empty($_GET['gclid']) ? $_GET['gclid'] : '';
            $_SESSION['fbclid'] = !empty($_GET['fbclid']) ? $_GET['fbclid'] : '';
            $_SESSION['utm_source'] = !empty($_GET['utm_source']) ? $_GET['utm_source'] : '';
            $_SESSION['utm_medium'] = !empty($_GET['utm_medium']) ? $_GET['utm_medium'] : '';
            $_SESSION['utm_campaign'] = !empty($_GET['utm_campaign']) ? $_GET['utm_campaign'] : '';
            $_SESSION['utm_term'] = !empty($_GET['utm_term']) ? $_GET['utm_term'] : '';
            $_SESSION['utm_physical_location'] = !empty($_GET['utm_Physical_Location']) ? $_GET['utm_Physical_Location'] : '';
            $_SESSION['utm_tragetid'] = !empty($_GET['utm_Tragetid']) ? $_GET['utm_Tragetid'] : '';
            $_SESSION['utm_target'] = !empty($_GET['utm_Target']) ? $_GET['utm_Target'] : '';
            $_SESSION['utm_placement'] = !empty($_GET['utm_Placement']) ? $_GET['utm_Placement'] : '';
            $_SESSION['utm_adposition'] = !empty($_GET['utm_Adposition']) ? $_GET['utm_Adposition'] : '';
        }
        
    //echo 'after';
    // print_r($_SESSION);
    //echo 'after';
     //echo '</pre>';
?>