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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T22:50:42+00:00 2026-06-13T22:50:42+00:00

I am porting a php snippet that relies on cookiejar provided by curl to

  • 0

I am porting a php snippet that relies on cookiejar provided by curl to get cookie and use it in the subsequent calls. I am facing problem with implementing the same code in Java with Apache Camel. I am not able to read the cookie that is returned. Any suggestions?

The php snippet is below:

$ckfile = tempnam ("/tmp", "CURLCOOKIE");
....
curl_setopt($ch,CURLOPT_URL,$url);



curl_setopt($ch,CURLOPT_POST,count($fields));
    curl_setopt($ch,CURLOPT_POSTFIELDS,$fields_string);
    curl_setopt($ch, CURLOPT_COOKIEJAR, $ckfile);
    curl_setopt($ch, CURLOPT_COOKIEFILE, $ckfile);
    curl_setopt($ch,CURLOPT_CONNECTTIMEOUT,5);
    curl_setopt($ch,CURLOPT_RETURNTRANSFER,1);

    // Executing the ch
    $result['EXE'] = curl_exec($ch);
    $result['INF'] = curl_getinfo($ch);
    $result['ERR'] = curl_error($ch);
    //print_r($result['EXE']);
  • 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-06-13T22:50:42+00:00Added an answer on June 13, 2026 at 10:50 pm

    Its a bit poor description of the problem you do. With only the PHP code. And no information about which Camel version, and what you do in Camel etc.

    For what it is worth, the cookies ought to be stored as headers in the Camel message.

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

Sidebar

Related Questions

I'm porting an existing app to rails that makes extensive use of stylized anchors
I'm porting a small snippet of PHP code to java right now, and I
I'm working on porting some PHP code to C, that contacts a web API.
We are currently porting some php scripts that are pulling datetimes from the facebook
I have an app that I'm porting from PHP/symfony to Ruby/Rails. Though the language
is there a library/class/code-snippet/etc. that allows me to directly receive mail in php? So
I have written a PHP application and have a problem that I cannot solve
I'm posting data using jquery/ajax and PHP at the backend. Problem being, when I
I am porting a PHP application from a 'own' 'framework' to Zend Framework (1.11.11)
Im porting a project from php to java. The project is a web-app based

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.