Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8963615
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T16:23:48+00:00 2026-06-15T16:23:48+00:00

I am having an issue that I hope you can help with. Let’s say

  • 0

I am having an issue that I hope you can help with. Let’s say I work for a hypothetical company called “Blammo”, and we have a hypothetical product called “Log”. I am trying to set up a system where someone could log in to logfromblammo.com and order some of our products, and then when they are ready to purchase go to checkout.blammo.com to pay for their order. Eventually I want to allow for Blammo to launch a new hypothetical product with it’s own website: rockfromblammo.com, and have that site also able to share a session with checkout.blammo.com so that users can have a single shopping cart across both product websites.

Naturally the hypothetical scenario described above is not how my company actually works, but it is a fair example of what I need to do. We have an existing user database, and we have ways to authenticate any of our users on any of our sites, but the goal I have is to allow users to cross seamlessly from one site to another without having to re-authenticate. This would also allow for us to seamlessly transfer data such as a shopping cart to the checkout site.

I have (briefly) looked at solutions such as OpenID, but I need to be able to integrate whatever solution we have with our existing authentication method, which is not terribly robust. Is there any good way to do this through PHP alone?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-15T16:23:49+00:00Added an answer on June 15, 2026 at 4:23 pm

    What you could do is create “cross-over” links between the sites to carry the session over.

    The simplest way is to pass the session id via the query string; e.g.

    http://whateverblammo.com/?sessid=XXYYZZ
    

    Before you start thinking that anyone can trap that information, think about how your cookies are transferred; assuming you’re not using SSL, there’s not much difference for someone who taps the network.

    That doesn’t mean it’s safe; for one, users could accidentally copy/paste the address bar and thus leaking out their session. To limit this exposure, you could immediately redirect to a page without the session id after receiving it.

    Note that using mcrypt() on the session id won’t help much, because it’s not the visibility of the value that’s the problem; session hijacking doesn’t care about the underlying value, only its reproducibility of the url.

    You have to make sure the id can be used only once; this can be done by creating a session variable that keeps track of the use count:

    $_SESSION['extids'] = array();
    
    $ext = md5(uniqid(mt_rand(), true)); // just a semi random diddy
    $_SESSION['extids'][$ext] = 1;
    
    $link = 'http://othersite/?' . http_build_query('sessid' => session_id() . '-' . $ext);
    

    When received:

    list($sid, $ext) = explode('-', $_GET['sessid']);
    session_id($sid);
    session_start();
    if (isset($_SESSION['extids'][$ext])) {
        // okay, make sure it can't be used again
        unset($_SESSION['extids'][$ext]);
    }
    

    You need these links every time a boundary is crossed, because the session may have gotten regenerated since the last time.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am having a JQuery/ASP issue that I hope someone can help me with.
Hope someone can help me here? Having an issue getting text that's located inside
Having an issue here that I have tried everything I can think of but
I am having a strange issue here I hope you all can help with.
I am having an issue that I can't seem to figure out. Hopefully somebody
I'm having an issue that I think is simple to diagnose, but I can't
I am having a strange issue that I can't seem to resolve. Here is
I am having an issue with somethign that I thoguth woudl have been simple.
I'm having a little trouble with some JS and hope someone can help. I
Hope you can help me with this problem. I am having issues with the

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.