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

  • Home
  • SEARCH
  • 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 6645319
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T00:16:21+00:00 2026-05-26T00:16:21+00:00

So, I have two sites, sites A and B. I need to make B

  • 0

So, I have two sites, sites A and B. I need to make B part of A. I did this by adding a module to A, and within that module, an iframe that contained a link to B. So, effectively speaking, B can still be accessed as a standalone site, but it can also be accessed through A.
Now, both sites require a login to allow access. I need to bypass the login for site B when it is accessed through Site A. I managed to bypass it, but only if the two sites are hosted on the same server (I used session variables), but now I need to be able to bypass the login screen on B regardless of the server it is hosted on.
So, how do I do this?

At first I thought cookies, but cookies are domain specific, the two sites might be hosted on separate domains.

Is there way a to use GET? So, Site A calls a url with the username written in the url, and then site B reads the url, parses it and logs in accordingly. I have no idea how I can implement this, what kind of url would I have to call, what kind of php code would Site B need, and lastly, how do you make something like this secure?

Thanks for all your help.

  • 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-05-26T00:16:21+00:00Added an answer on May 26, 2026 at 12:16 am

    Send a UUID with a hash to site B. The hash should be something that only both servers will know and can decode so something like the following should work.

    On site A

    <?php
    $salt = 'ashfiu8435t43434t fgfjgfgfuguSGDSBDY77;';
    $uuid = ''; // this should be set to the users ID
    $hash = sha1($salt . $uuid);
    ?>
    <a href="http://siteb.com?hash=<?php echo ($hash); ?>&uuid=<?php echo $uuid; ?>">Site B</a>
    

    On site B

    <?php
    $salt = 'ashfiu8435t43434t fgfjgfgfuguSGDSBDY77;';
    $uuid = $_GET['uuid'];
    $sent_hash = $_GET['hash'];
    $local_hash = sha1($salt . $uuid);
    
    if($sent_hash === $local_hash) {
       echo 'Logged in! Yay!';
    } else {
       echo 'Authentication failed';
    }
    

    You should make the hash more difficult to fake or figure out and make it expire after a given time so that people can’t just save hashes and re-use them or pass them about. I have deliberately kept it simple to show this would work.

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

Sidebar

Related Questions

I have two sites that are app1 and app2. If a user requests a
I have two tables: sites has_many users users belongs_to sites Is it better that
I have two databases on one machine that also has two different sites running
I have two divs that have 50% width each. I want to make it
Hi i have two wordpress sites where i want to make some ajax jsonp
I have several (old) Drupal-sites that need to be replaced with one single new
I have a very large ASP.NET project that i need to make good with
I have two sites with different SITE_IDs, but I want to have only one
I have two sites one is written in asp.net webforms and the other one
Lets say a have two sites. Site A and site B. On site A

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.