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

So i am trying to make an http request using ASIHTTPRequest class , to
I'm using HttpRequest to download several pages from a website (in a loop). Simplifying
I have a REST web service class which i call HttpRequest using curl.I wrote
I'm stuck on a really, really basic problem: Using HttpRequest to POST a wee
I'm pulling an RSS feed from a remote location using ServerXmlHttp: Dim httpRequest set
I tried to display the url using all sorts of methods of HttpRequest, I
im using Asihttprequest for my HTTP request, and my app will handel 3 language
I want to create a HTTP request from a specific port using C on
How to send an http request with either post/get method using javascript as an
I'm using curl to make php send an http request to some website somewhere

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.