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 6138289
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T17:51:13+00:00 2026-05-23T17:51:13+00:00

Hi thanks in advance… I am Working on a Project, I need some clarification

  • 0

Hi thanks in advance…
I am Working on a Project, I need some clarification to share data between two sites in a high secure manner. Currently I am using Form Post to share data. But I think about if there is an option to get site-1 session-data from site-2, because I think using a session is more secure. I don’t know how to use a sessions between two sites, but I hope someone here will know.

Like this:
Site 1 Coding

$_SESSION['customer_id'] = 'XYZ';  
$_SESSION['total_amount'] = '100';  

<a href=https://site2.com/do.php?session_id=<?=$_SESSION['session_id']?>>Click Here</a>  

Site 2 Code in do.php

$session_id = $_REQUEST['session_id'];  
$shared_data = bla_bla_bla_function($session_id);  

$customer_id = $shared_data['customer_id'];  
$total_amount = $shared_data['total_amount'];  

or is there any way to do the secure data sharing between two website other than form post, please tell me.
Thank you
Yours,
Kaartikeyan R

Found Solution

I have send the Customer ID and Amount via CURL to the Second Website, in that create a Record in Table for this and generate Encrypted ID with the Record ID, and return the encrypted ID.

So in the First website i get the Encrypted ID, and use it on URL redirection to Second website.

On the Second Website with the Encrypted ID i get the Customer ID and Amount.

  • 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-23T17:51:14+00:00Added an answer on May 23, 2026 at 5:51 pm

    Urk. First off, never, EVER do this:

    $session_id = $_REQUEST['session_id'];  
    

    This causes a security truck-hole we refer to as ‘session fixation’ ( read more: http://en.wikipedia.org/wiki/Session_fixation ).

    It seems you’re pretty heavy on security. If you need to share data from site 1 to site 2, you should do it through a single consumption bridge:

    1). Click on a link on Site 1 to a handler file, let’s call it redir.php.

    2). Redir.php first checks the existing session data.

    3). Redir.php writes relevant info into a DB row, along with some sort of identifier (say, an MD5 hash of the user ID + ‘_’+ current time), plus a ‘consumed’ flag, set false.

    4). Redir.php does a 301 redirect to Site 2, along with the identifier.

    5). Site 2 reads the relevant row out of the DB.

    6). If the data is good and has not yet been ‘consumed’, return a success and mark the data as consumed.

    7). If the data has been consumed, throw some sort of error.

    There are more complex ways of doing this, but I think this handles what you’re trying to do.

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

Sidebar

Related Questions

Thanks in advance for your help. I have a need within an application to
Thanks in advance for any help. I've got two combo boxes which I'd like
Thanks in advance.I want to find all the substring that occurs between K and
Thanks in advance for reading. I've been working with facebook login (both php and
thanks in advance for your help. I have two entities, Human and Chimp. Each
thanks in advance to anyone who helps out. i am working on a web
Thanks in advance. Currently working on an application for university that consists of a
Thanks in advance to anyone who can think of a more efficient or a
thanks in advance for looking at this. Essentially, I'm calling didInsertElement() and binding an
Thanks in advance for your assistance. I have the following exported part: [Export (typeof(INewComponent))]

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.