Results 1 to 13 of 13
  1. #1

    Save my cookie under different domain name

    What is my options if I will like to save a cookie under different domain website, I try to do this:
    Code:
    <noscript><img height="1" width="1" border="0" src="http://www.mydomain.com/script.asp"></noscript>
    But it's not response.

    What is the limitation and how can I do that?

    Thanks

  2. #2
    Join Date
    Aug 2001
    Posts
    5,066
    What do you actually try to do?

    Here you are calling an ASP script whose output is resized into a 1 pixel image and only displayed if JavaScript is disabled. This is not really cookie related.
    Sitemeer.com - Is your site up?
    Multi-Location Service Availability Check ● yes, we do HTTPS & IDN!


  3. #3
    Thanks for your answer.

    I'm building an affiliate network and I like to check if the user that buy from the shop is referred by an affiliate user.
    So in the page the user buy I like to check is cookie (that host in another domain) and add him to the list.

    What the solution for that?

  4. #4
    Join Date
    Aug 2001
    Posts
    5,066
    The affiliate user can either set the cookie himself, setting your domain name as target domain (then however the client's browser has to accept third party cookies) or would need to "include" some item from your site (for example an image as shown in your posting) which sets the cookie.
    Sitemeer.com - Is your site up?
    Multi-Location Service Availability Check ● yes, we do HTTPS & IDN!


  5. #5
    so if do that:
    <img height="1" width="1" border="0" src="http://www.mydomain.com/script.asp">
    It's need to work (and it's work).

    This is the best way or there is more options?

  6. #6
    Join Date
    Aug 2002
    Location
    Canada
    Posts
    665
    You cannot set a cookie, on another domain, for another domain. Could you imagine if this were possible? You could just generate cookies in your cache for bank websites, and keep generating until one of the cookies grants access. Bad news.

    Instead, what usually happens with affiliates is that they use a special link that identifies their hit on your site. So if you detect an incoming visit that has http://yoursite.com?affid=12 for example, then you store affid=12 into your persistent session (PHP/JSP/etc) and do whatever you need to do with it at any step.
    circlical - hosting software development
    forums * blog

  7. #7
    Join Date
    Aug 2001
    Posts
    5,066
    Quote Originally Posted by Saeven
    You cannot set a cookie, on another domain, for another domain. Could you imagine if this were possible? You could just generate cookies in your cache for bank websites, and keep generating until one of the cookies grants access. Bad news.
    In context with received cookies thats of course correct. However its still possible even without developing a custom HTTP client. One only needs to alter the cookie information stored by the browser to gain such a kind of access.
    Sitemeer.com - Is your site up?
    Multi-Location Service Availability Check ● yes, we do HTTPS & IDN!


  8. #8
    Join Date
    Aug 2002
    Location
    Canada
    Posts
    665
    One only needs to alter the cookie information stored by the browser to gain such a kind of access.
    No browser lets you modify or access cookie data stored by other domains.
    circlical - hosting software development
    forums * blog

  9. #9
    Join Date
    Aug 2001
    Posts
    5,066
    Then I wonder whats stored in %USERPROFILE%\Cookies.
    Sitemeer.com - Is your site up?
    Multi-Location Service Availability Check ● yes, we do HTTPS & IDN!


  10. #10
    Join Date
    Jan 2004
    Posts
    40
    If you have control over both domains there are some tricky things you can do, but if you don't (like it sounds like) then the best bet is to pass the identifier via a GET (in an encrypted form if necessary) as noted above.

  11. #11
    Someone can send me a link to an article or program that I can learn from her about how affiliate work?

    Thank you all!

  12. #12
    Join Date
    Nov 2005
    Location
    Palma de Mallorca, Spain
    Posts
    259
    Seaven pointed you in the right direction. Your affiliates must link to a script on your domain, passing an identifier.

    http://yourdomain.com/hitfromaffilia...om=affiliateID

    That script should store the cookie, identifying the referrer by the affiliateID.

    What's the part you don't get? Perhaps we can help

    Regards,

    Juan

  13. #13
    Join Date
    Mar 2006
    Posts
    965
    Someone can send me a link to an article or program that I can learn from her about how affiliate work?
    A good example would be to visit Kryptonic's web site at: http://www.kryptronic.com and post on their forum. ClickCartPro v6 is about to be officially released (according to the webmaster). Detailed instructions is also included in the box as it uses a very flexible affiliate feature (even in the current release).

    In the mean time, here's a theorical article on how affiliate works:

    http://www.hedrup.com/how-does-affil...grams-work.htm

Posting Permissions

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