Results 1 to 5 of 5

Thread: Cookies to temporarily recognize...

  1. #1
    Junior Registered
    Join Date
    Nov 2003
    Posts
    2

    Cookies to temporarily recognize...

    Hi all

    I need your help with this problem I have (well it's not really a problem but...)

    I'm finishing up my new website that has two different versions and two index pages leading to each version. Even though both indexes can be accessed at the beginning of the site and each index page is linked to the other through the whole site.... I decided to use a hits counter that will appear on both indexes.

    Now here's the big idea

    I want the site to somehow temporarily recognize each user (without registration/membership or stuff like that) so when the user is on one version of the site and somehow decides to visit the other version the counter should somehow know that the user already visited the first index and so the visitor number will remain the same and the user won't be recounted untill he leaves the site and comes back again later

    So could you guys help me out on this? I have no idea how to do this.

  2. #2
    Administrator Chris's Avatar
    Join Date
    Feb 2003
    Location
    East Lansing, MI USA
    Posts
    7,055
    It depends entirely on how your stat program works and what kind of technologies you're using on your site (php, javascript, just straight html).

    http://www.websitepublisher.net/article/php_cookies/

    That article may be able to help you.
    Chris Beasley - My Guide to Building a Successful Website[size=1]
    Content Sites: ABCDFGHIJKLMNOP|Forums: ABCD EF|Ecommerce: Swords Knives

  3. #3
    Junior Registered
    Join Date
    Nov 2003
    Posts
    2
    Thanks but I ve already read your article

    I'm using HTML and PHP on my site and the buttons and intro are made with flash 5

    The counter is made with PHP language by a friend of mine

    At the moment I set two different counters to just count for each version and of the site

  4. #4
    Administrator Chris's Avatar
    Join Date
    Feb 2003
    Location
    East Lansing, MI USA
    Posts
    7,055
    So use php to write a cookie indicating the site the person first visits.

    Then on every page view compare the current site with whatever is in the user's cookie and you'll know if he just jumped over or not. If he did you can make the appropriate changes to your hit counter.
    Chris Beasley - My Guide to Building a Successful Website[size=1]
    Content Sites: ABCDFGHIJKLMNOP|Forums: ABCD EF|Ecommerce: Swords Knives

  5. #5
    Giant Steps lo0ol's Avatar
    Join Date
    Nov 2003
    Location
    Pittsburgh
    Posts
    164
    That's a great article for background info about cookies, Chris. Nice work.
    I run good-tutorials.com.

    It's how I roll.

Similar Threads

  1. PHP and Cookies
    By lo0ol in forum Website Programming & Databases
    Replies: 2
    Last Post: 11-28-2003, 10:34 AM

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
  •