<?php
setcookie('count', isset($_COOKIE['count']) ? $_COOKIE['count']++ : 1);
$visitCount = $_COOKIE['count'];
?>
<html>
<head>
<title>Count Page Access</title>
</head>
<body>
<?if ($visitCount == 1): ?>
Welcome! This is the first time you have viewed this page.
<?else:?>
You have viewed this page <?= $_COOKIE['count'] ?> times.
<?endif;?>
</body>
</html>
1 comment:
Such a nice and informative blog. Thanks for sharing your knowledge with us. I will share your work with my friends. I have found a QA Consulting Company which is famous for its excellent QA services across the globe. If you need any service related to Qa software testing you can visit.
Post a Comment