PHP asynchronous curl calls
<p>In my web application I am storing data in a database and in a third party tool(for managing). While adding/updating data, I have to update data in both places. Updating data in the database works fine. But updating data in the third party tool takes time and because of this my webpage shows loading icon for some time. I am using curl calls to update data in the third party tool. If it fails to update in the third party tool I have to do some actions on it. So I cannot use CURLOPT_TIMEOUT
Sample code attached:</p>

<pre><code>    $ch = curl_init();
    curl_setopt($ch, CURLOPT_URL, $query_url);
    curl_setopt($ch, CURLOPT_RETURNTRANSFER, TRUE);
    curl_setopt($ch, CURLOPT_HTTPHEADER, $httpheaders);

    curl_setopt($ch, CURLOPT_POST, TRUE);
    curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode($postdata));

    if(($query_request_body = curl_exec($ch)) === FALSE)
    {
        $this-&gt;ret['status'] = FAILURE;
        $this-&gt;ret['message'] = "Query API call failed: '$query_url'";
        return $this-&gt;ret;
    }

    $query_response_code = curl_getinfo($ch, CURLINFO_HTTP_CODE);
    curl_close($ch);
    $this-&gt;ret['status'] = SUCCESS;
    $this-&gt;ret['code'] = query_response_code;
    return $this-&gt;ret;
</code></pre>

<p>There is only one curl request at any time. So I don't think curl_multi_exec will solve this problem.
Is there anyway to send asynchronous curl request?</p>