weblog

Discussion in 'ASP General' started by Matt, Jan 21, 2004.

  1. Matt

    Matt Guest

    Does ASP provide weblog functionality? For example, I want to collect the
    statistics of every page in the home page, how people access the pages,
    etc...

    In C:\WINNT\system32\LogFiles\W3SVC1, it has collections of web log file. I
    guess we can parse the file and do the analysis??
     
    Matt, Jan 21, 2004
    #1
    1. Advertising

  2. Matt

    Steven Burn Guest

    Or you could place something along the lines of the following in the header
    file of your page(s)

    <%
    'Just do the following for whatever you want to log (referer, page
    accessed etc)
    ' then write it out to a text file

    dim referer
    referer = Request.ServerVariables("HTTP_REFERER")

    'Your "write to log" code goes here........
    %>

    --
    Regards

    Steven Burn
    Ur I.T. Mate Group
    www.it-mate.co.uk

    Keeping it FREE!

    Disclaimer:
    I know I'm probably wrong, I just like taking part ;o)


    Matt <> wrote in message
    news:...
    > Does ASP provide weblog functionality? For example, I want to collect the
    > statistics of every page in the home page, how people access the pages,
    > etc...
    >
    > In C:\WINNT\system32\LogFiles\W3SVC1, it has collections of web log file.

    I
    > guess we can parse the file and do the analysis??
    >
    >
    >
     
    Steven Burn, Jan 21, 2004
    #2
    1. Advertising

  3. Matt

    Matt Guest

    What is "HTTP_REFERER", if i do the following, it won't print anything

    Response.Write(referer)



    "Steven Burn" <nobody@PVT_it-mate.co.uk> wrote in message
    news:#...
    > Or you could place something along the lines of the following in the

    header
    > file of your page(s)
    >
    > <%
    > 'Just do the following for whatever you want to log (referer, page
    > accessed etc)
    > ' then write it out to a text file
    >
    > dim referer
    > referer = Request.ServerVariables("HTTP_REFERER")
    >
    > 'Your "write to log" code goes here........
    > %>
    >
    > --
    > Regards
    >
    > Steven Burn
    > Ur I.T. Mate Group
    > www.it-mate.co.uk
    >
    > Keeping it FREE!
    >
    > Disclaimer:
    > I know I'm probably wrong, I just like taking part ;o)
    >
    >
    > Matt <> wrote in message
    > news:...
    > > Does ASP provide weblog functionality? For example, I want to collect

    the
    > > statistics of every page in the home page, how people access the pages,
    > > etc...
    > >
    > > In C:\WINNT\system32\LogFiles\W3SVC1, it has collections of web log

    file.
    > I
    > > guess we can parse the file and do the analysis??
    > >
    > >
    > >

    >
    >
     
    Matt, Jan 21, 2004
    #3
  4. HTTP_REFERER shows where the user came from, if the browser decided to make
    that information available. The problem you're seeing is that it's not
    always populated.
    http://www.aspfaq.com/2169

    --
    Aaron Bertrand
    SQL Server MVP
    http://www.aspfaq.com/




    "Matt" <> wrote in message
    news:...
    > What is "HTTP_REFERER", if i do the following, it won't print anything
    >
    > Response.Write(referer)
    >
    >
    >
    > "Steven Burn" <nobody@PVT_it-mate.co.uk> wrote in message
    > news:#...
    > > Or you could place something along the lines of the following in the

    > header
    > > file of your page(s)
    > >
    > > <%
    > > 'Just do the following for whatever you want to log (referer, page
    > > accessed etc)
    > > ' then write it out to a text file
    > >
    > > dim referer
    > > referer = Request.ServerVariables("HTTP_REFERER")
    > >
    > > 'Your "write to log" code goes here........
    > > %>
    > >
    > > --
    > > Regards
    > >
    > > Steven Burn
    > > Ur I.T. Mate Group
    > > www.it-mate.co.uk
    > >
    > > Keeping it FREE!
    > >
    > > Disclaimer:
    > > I know I'm probably wrong, I just like taking part ;o)
    > >
    > >
    > > Matt <> wrote in message
    > > news:...
    > > > Does ASP provide weblog functionality? For example, I want to collect

    > the
    > > > statistics of every page in the home page, how people access the

    pages,
    > > > etc...
    > > >
    > > > In C:\WINNT\system32\LogFiles\W3SVC1, it has collections of web log

    > file.
    > > I
    > > > guess we can parse the file and do the analysis??
    > > >
    > > >
    > > >

    > >
    > >

    >
    >
     
    Aaron Bertrand [MVP], Jan 21, 2004
    #4
  5. Matt

    Steven Burn Guest

    HTTP_REFERER is the refering page (the site/page your visitor came from)

    The following is some sample code you can use to test it. Note however, if
    you go directly to the page, it will not show a referer (basically because
    there wouldn't be one).

    <%
    Dim HTTPReferer
    HTTPReferer = Request.ServerVariables("HTTP_REFERER")

    Response.Write HTTPReferer

    Select Case HTTPReferer
    Case "http://www.google.co.uk"
    Response.Write "You came from http://www.google.co.uk"
    Case "http://www.google.com"
    Response.Write "You came from http://www.google.com"
    Case "http://www.yahoo.co.uk"
    Response.Write "You came from http://www.yahoo.co.uk"
    Case Else
    Response.Write "You came from " & HTTPReferer
    End Select
    %>
    --
    Regards

    Steven Burn
    Ur I.T. Mate Group
    www.it-mate.co.uk

    Keeping it FREE!

    Disclaimer:
    I know I'm probably wrong, I just like taking part ;o)


    Matt <> wrote in message
    news:...
    > What is "HTTP_REFERER", if i do the following, it won't print anything
    >
    > Response.Write(referer)
    >
    >
    >
    > "Steven Burn" <nobody@PVT_it-mate.co.uk> wrote in message
    > news:#...
    > > Or you could place something along the lines of the following in the

    > header
    > > file of your page(s)
    > >
    > > <%
    > > 'Just do the following for whatever you want to log (referer, page
    > > accessed etc)
    > > ' then write it out to a text file
    > >
    > > dim referer
    > > referer = Request.ServerVariables("HTTP_REFERER")
    > >
    > > 'Your "write to log" code goes here........
    > > %>
    > >
    > > --
    > > Regards
    > >
    > > Steven Burn
    > > Ur I.T. Mate Group
    > > www.it-mate.co.uk
    > >
    > > Keeping it FREE!
    > >
    > > Disclaimer:
    > > I know I'm probably wrong, I just like taking part ;o)
    > >
    > >
    > > Matt <> wrote in message
    > > news:...
    > > > Does ASP provide weblog functionality? For example, I want to collect

    > the
    > > > statistics of every page in the home page, how people access the

    pages,
    > > > etc...
    > > >
    > > > In C:\WINNT\system32\LogFiles\W3SVC1, it has collections of web log

    > file.
    > > I
    > > > guess we can parse the file and do the analysis??
    > > >
    > > >
    > > >

    > >
    > >

    >
    >
     
    Steven Burn, Jan 21, 2004
    #5
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. =?Utf-8?B?UG9udGlNYXg=?=

    Weblog application

    =?Utf-8?B?UG9udGlNYXg=?=, Jul 8, 2004, in forum: ASP .Net
    Replies:
    2
    Views:
    397
    Scott Allen
    Jul 8, 2004
  2. JD
    Replies:
    5
    Views:
    466
    Juan T. Llibre
    Jul 27, 2005
  3. Jimbo

    weblog tool

    Jimbo, Nov 7, 2005, in forum: ASP .Net
    Replies:
    1
    Views:
    496
    Juan T. Llibre
    Nov 7, 2005
  4. niels

    multiple user weblog?

    niels, Apr 4, 2005, in forum: HTML
    Replies:
    1
    Views:
    446
    Steve Pugh
    Apr 4, 2005
  5. =?Utf-8?B?Q29ybmVsaXM=?=

    creating a weblog site with asp.net 2.0 and c#

    =?Utf-8?B?Q29ybmVsaXM=?=, Apr 30, 2006, in forum: ASP .Net
    Replies:
    3
    Views:
    1,312
    Shaun McDonnell
    Apr 30, 2006
Loading...

Share This Page