Loading ...
Sorry, an error occurred while loading the content.

How do I track dynamic pages?

Expand Messages
  • forphil75
    I need to track dynamic pages for both a php site and a CF site. What I mean is I have a list page with several images. When I click on an image, I get a
    Message 1 of 2 , May 13, 2004
    • 0 Attachment
      I need to track dynamic pages for both a php site and a CF site. What I mean is I have a
      "list" page with several images. When I click on an image, I get a detail page with
      information about the image. All this is database driven. So my list page is list.php and
      my detail page is detail.php?id=123 (for example). So I need to know how many times
      database record 123 (id=123) was viewed. How do I set Webalizer to track this? I know
      Web Tredns can do this sort of thing.

      Thanks!

      forphil
    • enventa2000
      Hello: To track dinamic pages you ll have to download the source code, make a small change to it, and compile the source. Then use the program you just
      Message 2 of 2 , May 16, 2004
      • 0 Attachment
        Hello:

        To track dinamic pages you'll have to download the source code, make a
        small change to it, and compile the source. Then use the program you
        just compiled instead of the binary version (the one you don't need to
        compile).

        The change is:

        Open the file "webalizer.c". You need to change the "isurlchar" code.
        Search for "isurlchar" until you find something like this:

        /*********************************************/
        /* ISURLCHAR - checks for valid URL chars */
        /*********************************************/

        int isurlchar(unsigned char ch)
        {
        if (isalnum((int)ch)) return 1; /* allow letters,
        numbers... */
        if (ch > 127) return 1; /* allow extended chars..
        . */
        return (strchr(":/\\.,' *-+_@~()[]",ch)!=NULL); /* and a few
        special ones */
        }



        You need to change the last line for this one instead. Notice the
        addition of "?":

        return (strchr("?:/\\.,' *-+_@~()[]",ch)!=NULL);

        After this, all "?" are treated as a normal URL char.



        NOTE: The search string feature will stop working, because it relies
        on the meaning of "?" as a special character separating the URL from
        the query string...



        NOTE: Notice that these three URLS are three different URLs:

        detail.php?id=123
        detail.php?id=123&p=2
        detail.php?p=2&id=123

        If you have more than one parameter, you may consider grouping (this
        will only work after changing "isurlchar" and compiling):

        GroupURL ?id=123 id 123
        HideURL ?id=123



        You can find some discussion on security issues from doing this and
        some other random oddities by searching the function name in the group
        messages:

        http://groups.yahoo.com/group/webalizer/messagesearch?query=isurlchar



        --- In webalizer@yahoogroups.com, "forphil75" <forphil@e...> wrote:
        > I need to track dynamic pages for both a php site and a CF site.
        What I mean is I have a
        > "list" page with several images. When I click on an image, I get a
        detail page with
        > information about the image. All this is database driven. So my
        list page is list.php and
        > my detail page is detail.php?id=123 (for example). So I need to
        know how many times
        > database record 123 (id=123) was viewed. How do I set Webalizer to
        track this? I know
        > Web Tredns can do this sort of thing.
        >
        > Thanks!
        >
        > forphil
      Your message has been successfully submitted and would be delivered to recipients shortly.