Results 1 to 2 of 2

Thread: count the number of times page reloads

  1. #1
    Join Date
    Dec 2007
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default count the number of times page reloads

    hi,
    how can i count the no of times a page reloads using php

  2. #2
    Join Date
    Mar 2006
    Location
    Illinois, USA
    Posts
    12,164
    Thanks
    265
    Thanked 690 Times in 678 Posts

    Default

    You can't check this directly; you can, however, store a variable on your server per IP address for how many times that page is loaded. [technically how many times the server processes the php-- in theory, it might not actually reach the end user]
    Using sessions this wouldn't be difficult.

    <?php session_start(); @$_SESSION['thispageidnumload']++; ?>

    And do whatever you'd like with that variable.
    Daniel - Freelance Web Design | <?php?> | <html>| español | Deutsch | italiano | português | català | un peu de français | some knowledge of several other languages: I can sometimes help translate here on DD | Linguistics Forum

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •