SitePoint Sponsor

User Tag List

Results 1 to 2 of 2
  1. #1
    SitePoint Member
    Join Date
    Dec 2004
    Location
    Cooperstown
    Posts
    7
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Create List of Most Visited Pages

    Let's suppose I have a directory filled with PHP pages. Let's suppose I want to be able to show a list of which pages receive the most traffic, dynamically, so the list is updated as the pages receive more traffic?

    How would I do that? Can PHP do that, or do I need a javascript?

  2. #2
    SitePoint Zealot
    Join Date
    Nov 2004
    Location
    Ankara/Turkey
    Posts
    110
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    of course php will do that! how? ok i won't write all the script for you because i have no more time for this, but i give you my plans

    --> first you create a php engine that logs everything to a log file with the page name
    ex: directory: logs/
    site is 3 pages -> contact, main, support
    there are three files in logs directory
    contact.log main.log support.log

    and do not forget to add:
    <?php
    $listpage = "main";
    include ("countthispage.php");
    ?>

    this is the main idea...

    --> and now you must create a new page which shows which page visits too much!
    if you are doing that with directory listing it is also so good. (i mean opendir(); etc..)
    and this page play with codes and get your top 1 page! (or 10 it is up to you)

    gooood work


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
  •