Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 6 of 6
  1. #1
    New to the CF scene
    Join Date
    Jun 2003
    Location
    Brooklyn, NY
    Posts
    9
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Want to Create a Simple Stat Script

    There is a section of my company's intranet that I sometimes work on that I think is a total waste of time because I'm pretty sure that no one ever goes to look at the pages. There are no server logs or stats that I can access to see if I'm right or not. Can anyone think of way to write a javascript that will either send me an e-mail each time a link is clicked, or write to a text file each time a link is clicked? It should come from the onClick event. The platform is Microsoft IIS server. The server also runs ASP. Thanks!

  • #2
    Regular Coder
    Join Date
    Aug 2003
    Location
    Loughborough University
    Posts
    427
    Thanks
    0
    Thanked 0 Times in 0 Posts
    OK, I'm pretty new to ASP so I'm not sure if this code will work (haven't tested it either), it includes links to show/hide the counter.
    It uses Session variables to keep track of whether to show/hide the counter and an Application variable to keep track of the count. At least that's the way it's supposed to work.
    Attached Files Attached Files
    AMD Athlon "Barton" XP 3200+ (11*200.5MHz = 2.2GHz)
    BFG GeForce 6800 Ultra OC 256Mb
    3 * Kingston 256Mb PC3200 DDR400
    Seagate Barracuda 120Gb Ultra ATA-100 and Seagate Barracuda 160Gb, SATA-150

  • #3
    Regular Coder
    Join Date
    Aug 2003
    Location
    Loughborough University
    Posts
    427
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Any good?
    AMD Athlon "Barton" XP 3200+ (11*200.5MHz = 2.2GHz)
    BFG GeForce 6800 Ultra OC 256Mb
    3 * Kingston 256Mb PC3200 DDR400
    Seagate Barracuda 120Gb Ultra ATA-100 and Seagate Barracuda 160Gb, SATA-150

  • #4
    New to the CF scene
    Join Date
    Jun 2003
    Location
    Brooklyn, NY
    Posts
    9
    Thanks
    0
    Thanked 0 Times in 0 Posts
    The attachment came out garbled. Could you paste the script into a reply? Thanks for responding.

  • #5
    Supreme Master coder! glenngv's Avatar
    Join Date
    Jun 2002
    Location
    Philippines
    Posts
    11,043
    Thanks
    0
    Thanked 251 Times in 247 Posts
    IIS already has a logging feature. It logs all the requests received by the server. Open your IIS console and follow these steps:

    Default Website->Properties->Web Site tab, check Enable Logging
    Choolse W3C Extended Logi File Format, click Properties button, then you can specify the log file directory and log time period. In the Extended Properties tab, you can specify what information to log.

  • #6
    Regular Coder
    Join Date
    Aug 2003
    Location
    Loughborough University
    Posts
    427
    Thanks
    0
    Thanked 0 Times in 0 Posts
    I used WinZip to zip it, did you try to unzip it with WinZip? If you would prefer I will upload it again, but zipped with WinRar.
    I can't do that right now though because I'm on a different computer to the one that I'm usually on.

    Alternatively you could just glenngv's idea, I don't have IIS so I can't advise you either way on that issue.
    AMD Athlon "Barton" XP 3200+ (11*200.5MHz = 2.2GHz)
    BFG GeForce 6800 Ultra OC 256Mb
    3 * Kingston 256Mb PC3200 DDR400
    Seagate Barracuda 120Gb Ultra ATA-100 and Seagate Barracuda 160Gb, SATA-150


  •  

    Posting Permissions

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