Results 1 to 6 of 6

Thread: ASP Cookie Checking?

  1. #1
    Sublime HEXUS.net
    Join Date
    Jul 2003
    Location
    The Void.. Floating
    Posts
    11,819
    Thanks
    213
    Thanked
    233 times in 160 posts
    • Stoo's system
      • Motherboard:
      • Mac Pro
      • CPU:
      • 2*Xeon 5450 @ 2.8GHz, 12MB Cache
      • Memory:
      • 32GB 1600MHz FBDIMM
      • Storage:
      • ~ 2.5TB + 4TB external array
      • Graphics card(s):
      • ATI Radeon HD 4870
      • Case:
      • Mac Pro
      • Operating System:
      • OS X 10.7
      • Monitor(s):
      • 24" Samsung 244T Black
      • Internet:
      • Zen Max Pro

    ASP Cookie Checking?

    Lo oh knowlegable peeps

    We're thinking of installing a commission type thing for banner adverts on the company website, paying commission on every sucessful holiday booking referred to us by these banner ads..

    However, the integration of the tracking code requires us to send this company *every* order number and sale total regardless whether it orignated from them or not, with us relying on them to filter out which sales apply to them, and which that don't.

    Obviously we don't really want to be sending them details of everything we do, so I was thinking of implementing a script to check for the existence of this tracking cookie, and if so, insert the tracking code..

    I know I can do a request.cookies statement, but how do I tell it which cookie to check for? I've looked through the temporary internet files directory and found the referral cookie, but how do I know which part of it is actually the cookie's name, and which bits are the "key" ?
    (\__/)
    (='.'=)
    (")_(")

  2. #2
    HEXUS.net Webmaster
    Join Date
    Jul 2003
    Location
    UK
    Posts
    3,108
    Thanks
    1
    Thanked
    0 times in 0 posts
    Not sure how it works in ASP but cookies are generally passed as an array with the key being the cookie name and the value being the cookie value so

    cookie[hexus.net]=username

    where hexus.net is the key and username is the value

  3. #3
    Sublime HEXUS.net
    Join Date
    Jul 2003
    Location
    The Void.. Floating
    Posts
    11,819
    Thanks
    213
    Thanked
    233 times in 160 posts
    • Stoo's system
      • Motherboard:
      • Mac Pro
      • CPU:
      • 2*Xeon 5450 @ 2.8GHz, 12MB Cache
      • Memory:
      • 32GB 1600MHz FBDIMM
      • Storage:
      • ~ 2.5TB + 4TB external array
      • Graphics card(s):
      • ATI Radeon HD 4870
      • Case:
      • Mac Pro
      • Operating System:
      • OS X 10.7
      • Monitor(s):
      • 24" Samsung 244T Black
      • Internet:
      • Zen Max Pro
    here's an example cookie if it helps:

    Code:
    LCLK
    cjo!w5wr-f13zm83
    emjcd.com/
    1024
    3832854656
    30061089
    360625952
    29693963
    *
    S
    8uvf9u-509750687-1108986197370-xq
    emjcd.com/
    1024
    3832854656
    30061089
    360625952
    29693963
    *
    (\__/)
    (='.'=)
    (")_(")

  4. #4
    Ex-MSFT Paul Adams's Avatar
    Join Date
    Jul 2003
    Location
    %systemroot%
    Posts
    1,926
    Thanks
    29
    Thanked
    77 times in 59 posts
    • Paul Adams's system
      • Motherboard:
      • Asus Maximus VIII
      • CPU:
      • Intel Core i7-6700K
      • Memory:
      • 16GB
      • Storage:
      • 2x250GB SSD / 500GB SSD / 2TB HDD
      • Graphics card(s):
      • nVidia GeForce GTX1080
      • Operating System:
      • Windows 10 x64 Pro
      • Monitor(s):
      • Philips 40" 4K
      • Internet:
      • 500Mbps fiber
    Isn't cross-site cookie access usually blocked, for security reasons?

    If a client visits www.somesite.com and a cookie is created (username@www.somesite.com.txt), then a redirection occurs and the user ends up at www.someothersite.co.uk, the client will only look for a cookie called username@www.someothersite.co.uk.txt ?


    Disclaimer:
    I am not presenting this as fact, my knowledge of cookies is very slim, and I've only used cookies in ASP to store autologin and country/time offset details for a games forum I was running a couple of years ago.

    The reason I think it is like this is that a site could request cookies for well-known bank sites, auction sites, games sites (for example) and read information from them to post back to the dodgy server... but maybe I'm wrong and there is a better "permission" system for cookies to trust 3rd party sites?
    ~ I have CDO. It's like OCD except the letters are in alphabetical order, as they should be. ~
    PC: Win10 x64 | Asus Maximus VIII | Core i7-6700K | 16GB DDR3 | 2x250GB SSD | 500GB SSD | 2TB SATA-300 | GeForce GTX1080
    Camera: Canon 60D | Sigma 10-20/4.0-5.6 | Canon 100/2.8 | Tamron 18-270/3.5-6.3

  5. #5
    Pixel Abuser Spunkey's Avatar
    Join Date
    Nov 2003
    Location
    Milton Keynes
    Posts
    1,523
    Thanks
    0
    Thanked
    0 times in 0 posts
    as Paul said cookies are only viewable by the generating site for security reasons.

    Just FYI, in the example you've got, LCLK and S are the keys, and 'cjo!w5wr-f13zm83' and '8uvf9u-509750687-1108986197370-xq' are the values. emjcd.com is the generating site, and the other values are just generated for maintenance - max key length and datestamps IIRC.
    Last edited by Spunkey; 21-02-2005 at 02:23 PM.

  6. #6
    Sublime HEXUS.net
    Join Date
    Jul 2003
    Location
    The Void.. Floating
    Posts
    11,819
    Thanks
    213
    Thanked
    233 times in 160 posts
    • Stoo's system
      • Motherboard:
      • Mac Pro
      • CPU:
      • 2*Xeon 5450 @ 2.8GHz, 12MB Cache
      • Memory:
      • 32GB 1600MHz FBDIMM
      • Storage:
      • ~ 2.5TB + 4TB external array
      • Graphics card(s):
      • ATI Radeon HD 4870
      • Case:
      • Mac Pro
      • Operating System:
      • OS X 10.7
      • Monitor(s):
      • 24" Samsung 244T Black
      • Internet:
      • Zen Max Pro
    ahh bugger.

    Thanks anyway guys
    (\__/)
    (='.'=)
    (")_(")

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. cookie encoding
    By piggeh in forum Software
    Replies: 2
    Last Post: 18-12-2004, 06:32 PM
  2. ASP Help required
    By TomWilko in forum Software
    Replies: 1
    Last Post: 27-10-2004, 02:36 PM
  3. Learning ASP
    By TomWilko in forum Software
    Replies: 9
    Last Post: 02-10-2004, 04:28 PM
  4. *thump* - problem with asp scripts
    By scottyman in forum Software
    Replies: 1
    Last Post: 28-04-2004, 06:54 PM
  5. Interactive ASP database stuff
    By joshwa in forum Software
    Replies: 8
    Last Post: 31-03-2004, 02:36 PM

Posting Permissions

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