I am running adsense on my site and using php includes files where entire adsense code is placed named ga1.php, ga2.php, ga3.php and ga4.php. everything within the code is identical except for a link colours meaning that on each page refresh or by going to any other page on my site, new include is used containing Google Adsense code with new colour of the links. this is all handled by the following code:
<?php
session_start();
if (isset($_SESSION['cnt'])){$_SESSION['cnt'] += 1; if( $_SESSION['cnt'] > 4)$_SESSION['cnt'] =1;}
else {$_SESSION['cnt'] = 1;}
include("/var/www/vhosts/MySite.com/httpdocs/includes/ga" . $_SESSION['cnt'] . ".php");
?>
everything works fine except for one thing, I do not want to use session_start()
since it sets up the following in header response:
Set-Cookie: PHPSESSID=u8rvtkbjas94ifsa5okhskkim5; path=/
Expires: Thu, 19 Nov 1981 08:52:00 GMT
Cache-Control:no-store, no-cache, must-revalidate, post-check=0, pre-check=0
Pragma: no-cache
I can have session_start()
on some of my pages, where session need to be tracked but not on all, so looking for some solution to solve my problem if there is any?
Your suggestions are always of the great value to me and always really appreciated.