1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

Unified Login

Discussion in 'Programming' started by Help Desk, Oct 22, 2004.

  1. #1
    How would you go about having 2 domains (on 2 seperate servers) that have not only the same login information, but also allow one to go from one server to the next without having to log back in?
     
    Help Desk, Oct 22, 2004 IP
  2. daboss

    daboss Guest

    Messages:
    2,249
    Likes Received:
    151
    Best Answers:
    0
    Trophy Points:
    0
    #2
    The only way I can think of is to have a cookie containing the login info at the browser.
     
    daboss, Oct 23, 2004 IP
  3. Ozz

    Ozz Peon

    Messages:
    112
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    0
    #3
    I'm not shure if the cookie domain settings (if you are using php) can help. If you set a cookie in domain A it is not available in domain B... as daboss said you can refer the user data using the URL..... or a not so clean idea is to generate your own cookies and copy the file to the other server using cron or something. That way (if you keep both versions of the file exact) you will know who is online in the other site.
     
    Ozz, Oct 25, 2004 IP
  4. aspcoder

    aspcoder Peon

    Messages:
    132
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #4
    You need single database table and store login information for both server/sites.
     
    aspcoder, Dec 3, 2004 IP
  5. mushroom

    mushroom Peon

    Messages:
    369
    Likes Received:
    15
    Best Answers:
    0
    Trophy Points:
    0
    #5
    That would work.
    But if you don't want to do or can't do it that way and if you are using php
    1. Modify the links from site A to site B for logged in users to include the user name (?name=user_name).
    2. Use " if ( substr_count($_SERVER["HTTP_REFERER"],"url_of_site_A")==1)" to auto login the user on site B " if valid user "
    3. Do the same in reverse.
     
    mushroom, Dec 3, 2004 IP