SitePoint Sponsor

User Tag List

Results 1 to 3 of 3
  1. #1
    Trash Boat mkoenig's Avatar
    Join Date
    Aug 2007
    Posts
    1,232
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Question New to JavaScript need help with Stats

    Im working on a new product (not launched yet)

    The project grabs stats from remote pages. Basically a javascript stat application, that is supposed to get ip, current page, and page referral.

    Does anyone here know a script or how to get that info?
    I can do all that with php, but im a very poor programmer indeed when it comes to javascript.

    Much thanks in advance.

  2. #2
    I meant that to happen silver trophybronze trophy Raffles's Avatar
    Join Date
    Sep 2005
    Location
    Tanzania
    Posts
    4,662
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    Have a look at these pages:

    https://developer.mozilla.org/En/DOM/Window.location - for the current page URI
    https://developer.mozilla.org/En/DOM/Document.referrer - the page the user came from

    As for the IP address, javascript can't access that by itself. You can do an ajax request to a PHP page that spits it out or, better still, just make your JavaScript generated by PHP so it can output this as a variable.

  3. #3
    Trash Boat mkoenig's Avatar
    Join Date
    Aug 2007
    Posts
    1,232
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thanks man having a look now


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
  •