I have this code to capture page visits:
$host = $_SERVER['HTTP_HOST']; $page = isset($_SERVER['PHP_SELF']) ? $_SERVER['PHP_SELF'] : ''; date_default_timezone_set('America/Chicago'); //change server time zone to UTC-600 (Chicago, IL time) $date = date("Y/m/d"); $time = date("H:i:s");
on every page I have this:
<?php include("https://www.domain.com/r/pagevisit.php"); ?>
this results in my traffic report echoing out the page visited as /r/pagevisit.php instead of the real page. This code works just fine on another domain I manage, but on that site, the code on any given page looks like this:
<?php include("../reporting/pagevisit.php"); ?>
I have allow_URL_include turned on in the .INI file. is what I’m doing with the full path URL wrong? does that ever work? I saw on the S/O forum that one expert says this is not to be done, ever.