Page View Counter

/ Published in: PHP
Save to your folder(s)

A simple PHP application for counting how many views a page gets.

Copy this code and paste it in your HTML
  1. <?php
  3. if(isset($_SESSION['views']))
  4. $_SESSION['views']=$_SESSION['views']+1;
  5. else
  6. $_SESSION['views']=1;
  7. echo "Page View Count = ". $_SESSION['views'];
  8. ?>

Report this snippet


RSS Icon Subscribe to comments

You need to login to post a comment.