Code: Select all
<?php
if (isset($_SESSION['hit']))
$_SESSION['hit']++;
else
$_SESSION['hit']=0;
$try_file='fb0'.$_SESSION['hit'].'.php';
if (file_exists($try_file))
include $try_file;
else
{
$_SESSION['hit']=0;
}
?>Thanks for any help
P.S. before anyone asks I need this because Im part of a banner exchange that requires a new banner to be displayed on each page. If you have the same banner on each page you get credited with 1 visit even if the visitor goes to 10 pages. If you have different banner on each page you will be credited with 10 visits rather than 1