counter on page
Posted: Mon Nov 21, 2005 3:31 pm
now when a visitor visits my page, he remembers the number of houses he has looked at, but i would like to change this in the number of times a certain house is visited (number of times by all the visitors)
could anyone help me?
Code: Select all
if($a1[AgentID] != $_SESSION[AgentID])
{
if(!empty($_COOKIE[RealEstates]))
{
$CookieArray = explode("|", $_COOKIE[RealEstates]);
array_unique($CookieArray);
$rev = count($CookieArray);
if(!in_array($_GET[id], $CookieArray))
{
$NewValue = $_COOKIE[RealEstates]."|".$_GET[id];
setcookie ("what come's here?", $NewValue);
$ch = '1';
}
}
else
{
setcookie ("wat come's here?", $_GET[id]);
}
if($rev == '0' || empty($rev))
{
$HomeCount = 1;
}
else
{
if(isset($ch))
{
$HomeCount = $rev + 1;
}
else
{
$HomeCount = $rev;
}
}
$HomeViews = $HomeCount." people visited this page.";
}