im having trouble w/ this stats script, what im trying to do is to have
<?php
//stats for /stat directory
define("_BBC_PAGE_NAME", "Contact");
define("_BBCLONE_DIR", "../stats/stats/");
define("COUNTER", _BBCLONE_DIR."mark_page.php");
if (is_readable(COUNTER)) include_once(COUNTER);
?>
included in a page, but the problem is that im using php includes to display pages so the problem is that i alread have one of those stats in the index page names "Index" for the BBC_Page_name and when it has a second include of the stats i guess it doesnt work... i am trying to make a script that gets the url and if it has a "?page=" then not to include the stat in the index page.
i tried
<? $curpage = $PHP_SELF;
$curpage = str_replace("/","", $curpage);
if ($curpage == "index.php")
{ //stats for /stat directory
define("_BBC_PAGE_NAME", "Main Page");
define("_BBCLONE_DIR", "./stats/stats/");
define("COUNTER", _BBCLONE_DIR."mark_page.php");
if (is_readable(COUNTER)) include_once(COUNTER);
}
?>
but then i figured out that im using php includes for the pages so that wouldnt work, i guess only way that would work would be to get url, see if it has "?page=" in it if so, dont print the main page stats and if not then, do print them