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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T12:25:05+00:00 2026-06-04T12:25:05+00:00

My code creates basic curl handle by curl_init and then sets some options. Then

  • 0

My code creates basic curl handle by curl_init and then sets some options. Then I am using this handle to log-in on some website. I works fine. When I am logged in I would like to access some resources on website that are available only for logged int users. But I want to do it simultanously using curl_multi.

So after logging in I use curl_copy_handle on the handle that I used to log in, I set up new URL for copied handle and add copied handle to curl multi handle.

Then I execute curl multi handle – It works without errors but it can’t access member resources – it seems that curl_copy_handle() doesn’t copy cookies?

How can I copy all cookies (set up during login) along with curl_copy_handle?

I am not pasteing code here because it works ok – I just need method to share cookies with multiple handles.

  • 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-04T12:25:07+00:00Added an answer on June 4, 2026 at 12:25 pm

    presuming that you have the correct cookie value, going from the documentation you can use curl_setopt with the CURLOPT_COOKIE value to set them for the request.

    curl_setopt($curlhandle, CURLOPT_COOKIE, "Name=Value");
    

    curl-setopt function

    So just call that on your handle before performing curl_copy_handle. (there’s also CURLOPT_COOKIEFILE to specify a physical cookie you saved.

    I haven’t ever used this myself though.

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

Sidebar

Related Questions

I have some code to create a basic dialog box with several options -
I have some Visual Basic Code that creates a chart for each row. It
I'm using mootools 1.4.3 for basic class inheritance. I'm actually converting some code from
I have some basic code here. It just creates a div element to a
I have some code below. This code is a basic push/pop stack class that
Here's some basic code to create a ListViewGroup, add it to the Groups collection
Client side javascript code creates some elements (about 50-100) in a cycle: for (var
I have some code that creates a Process instance and later starts it. There's
I have some code that creates a bunch of UITextViews and puts them into
I have basic authentatication working with REST API using curl: curl -X POST -H

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.