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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 11, 20262026-05-11T06:37:23+00:00 2026-05-11T06:37:23+00:00

I am using the httprequest class in one of my applications to request a

  • 0

I am using the httprequest class in one of my applications to request a cross domain page. Basically I needed to inlcude two pages based on thge logged in state of the user, via cross domain ajax request. Due to security issues this is not allowed.

So what I did was I created a proxy page which uses the httprequest class to request the remote file which inturn includes the two apges based on the logged in state of the user.

Now the issue is that each time the httprequest class is making a new request thus the session is getting destroyed, so once I am logged in and I refresh the page next time the class is sending a new request and thus creating a new session, so the logged in user is getting logged out.

What I need to do is maintain the same session over several http requests., untill the user opts to logout.

I have observed in firebug that the http request is sending the PHPSESSID cookie, but there is nothing being sent from the server in response. Does it make any sense?

How can I do this using php cookies? Kindly 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. 2026-05-11T06:37:24+00:00Added an answer on May 11, 2026 at 6:37 am

    You need to pass along the cookies between browser and that remote server. I’m working on something similar right now but I’ll give you a simpler example:

    proxy.php

    <?php  session_start();  if (! isset($_SESSION['remote_session_id'])) {      $response = make_initial_request();      /*      * This means to read the Set-Cookie header and store it in your own session      */     $_SESSION['remote_session_id'] = $remote_session_id = get_remote_session_id($response);  } else {     /*      * Inside this function you must send a Cookie header populated with the value      * of $remote_session_id. Its name is dependent on the remote server.      */     $response = make_remote_request($_SESSION['remote_session_id']); } 
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Actually, I'm using this way. Do you have a better way? private bool AcceptJson(HttpRequest
I'm having trouble sending out a simple HTTP request using Actionscript 3's Socket() object.
Using PyObjC , you can use Python to write Cocoa applications for OS X.
Using JDeveloper , I started developing a set of web pages for a project
I'm using an NSOperationQueue to manage HTTP connections (using ASI-HTTPRequest). Since I have multiple
I've downloaded an HttpHandler class that concatenates JS files into one file and it
I am developing an App where I would need to perform HTTP Request using
I'm looking for a way to monitor/observe a singleton class I'm using to pass
I write a class to handle the request to web. And it has a
Using online interfaces to a version control system is a nice way to have

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.