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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T14:18:13+00:00 2026-06-12T14:18:13+00:00

I wrote a class to make it easier to use multi cURL requests I

  • 0

I wrote a class to make it easier to use multi cURL requests I want to log errors when I get a 404 error or any other error.
I already have CURLOPT_FAILONERROR set to true.

I’m currently using curl_multi_info_read().

and this is my code:

$active = null;
    do {
        $multi_exec = curl_multi_exec($this->_multi_handle, $active);
    } while ($multi_exec == CURLM_CALL_MULTI_PERFORM);

    while ($active && $multi_exec == CURLM_OK) {
        if (curl_multi_select($this->_multi_handle) != -1) {
            do {
                $multi_exec = curl_multi_exec($this->_multi_handle, $active);
                $info = curl_multi_info_read($this->_multi_handle);
                if ( $info['result'] != 0 ) {
                    $this->_errors[] = $info; // currently storing the whole array
                }
            } while ($multi_exec == CURLM_CALL_MULTI_PERFORM);
        }
    }

The result on error is an array like this:

Array
(
    [0] => Array
        (
            [msg] => 1
            [result] => 22 // on success this is 0
            [handle] => Resource id #4 // does this help in finding the url if I have the handle ID ?
        )

So how can I get the URL where the error happened ? this only gives me the handle resource ID

and thanks in advance.

  • 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-12T14:18:15+00:00Added an answer on June 12, 2026 at 2:18 pm

    Depending on what you actually need, you can pass this handle to either curl_error or curl_errno function to check for errors, and you can use curl_getinfo to extract the URL from that handle:

    curl_getinfo($info['handle'], CURLINFO_EFFECTIVE_URL);
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I use a self-made error/log-class for my project which is also be able to
Situation I'd like to make an RPC interface easier to use. This is a
I wish to make an instance of built-in class object , and use it
I'm using the jQuery validation plugin and I want make use of a custom
I start studying ANT today in order to make Java compiling easier. I wrote
I wrote this little code std::map<int,template<class T>> map_; map_.insert(make_pair<int,message>(myMsg.id,myMsg)); but the compiler doesn't seem
Here is a related manager I wrote: class PortfolioItemManager(models.Manager): use_for_related_fields = True def extended(self):
Okay, so i have this code i wrote: class Connection { public static StreamWriter
I wrote a class that implements the IGroupPolicyObject Interface in COM. one of the
I wrote simple class that on the start it just increase the value of

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.