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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T00:40:47+00:00 2026-05-13T00:40:47+00:00

I am tring to read a cookie value which I got after login by

  • 0

I am tring to read a cookie value which I got after login by sending a POST request.

Then I want to sent that cookie value with another POST request using Curl to another action. But after sending this when I am trying to see all posted header it does display that I have send any cookie value. This value is not available to my posted URL so not able to access the information due to authentication. Please tell me where I have done something wrong:

$URL1        = "http://www.getinf.com/iconf/user?action=buGroup";
$postfields1 = "device=mapp&type=ajax&name1=ra&cc1=91&min1=90name2=imm&cc2=91&min2=97";

// sends a post request
$ch1 = curl_init();   
curl_setopt($ch1, CURLOPT_URL,$URL1); 
curl_setopt($ch1, CURLOPT_POST, 1);

curl_setopt($ch1, CURLOPT_COOKIE,'JSESSIONID=199FFF6355DEA87F3D72E692E7514AD2');
curl_setopt($ch1, CURLOPT_FOLLOWLOCATION, true);
curl_setopt($ch1, CURLOPT_HEADER,true);
curl_setopt($ch1, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch1, CURLOPT_POSTFIELDS, $postfields1);

$result = curl_exec($ch1);

print_r(headers_list());// displays all post request data
$ret = ReturnVal($result);
print_r(get_headers($URL1, 1)); // 
curl_close ($ch1);

So what is wrong in this code that is preventing JSESSIONID value accessible as a cookie value?

  • 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-13T00:40:47+00:00Added an answer on May 13, 2026 at 12:40 am

    Check the comments (or search “cookie”) on this page in the php docs:

    Whats not mentioned in the
    documentation is that you have to set
    CURLOPT_COOKIEJAR to a file for the
    CURL handle to actually use cookies,
    if it is not set then cookies will not
    be parsed.

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

Sidebar

Related Questions

I want to be able to set a single cookie, and read that single
I am trying to read cookie named as Pdf which has following value http://engine.edocbuilder.com/include/fileDownload-aspx?p=xBfpz3UGPkWamLTDILo%2fWbFqh3FomdYuByiTwfB4RXN0sDN6tY%2fDfxJzzfPZblUl5aSBO3v96%2bJ6acwT7L5oi8tyMuGwKshYtGK%2bfhgiSfM%3d&s=4995b496-e735-4a26-9801-253a34ab0481
I am trying to set and then read a Cookie using the Selenium Webdriver.
After trying to read various articles on sending emails with attachments in PHP (I
I'm working with ColdFusion trying to read the value stored in a session cookie
I am trying to read cookie through JavaScript but after complete the process of
I am trying to read cookie without post back. I used WebMethod to save
I got an array like this $value = {array('id'=>$id, 'email'=>$email, 'token'=>$token)} I want to
I want to set a cookie with a user's timezone when they login. AccountController.LogOn()
I have a cookie that is being set by Microsoft ISA. I want to

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.