Wednesday, 19 July 2017

How to create an visitor counter in PHP | hit counter

Total page view in the php. This count hit in the page.





 <?php  
 session_start();  
 if(isset($_SESSION['page_view'])){  
   $_SESSION['page_view'] = $_SESSION['page_view']+ 1;  
 }else{  
   $_SESSION['page_view'] = 1;  
 }  
 echo "Total page views = ". $_SESSION['page_view'];  
 ?>  



Click to download here.

No comments:

Post a Comment

How to create an visitor counter in PHP | hit counter

Total page view in the php. This count hit in the page. <?php session_start(); if(isset($_SESSION['page_view'])){...