Curl using 100 of array record can't inserting

Dear team i have an array with 100 of records.now my issue is i would like to insert 100 of record using this Curl function.but after some record is inserted automatically curl function not working.what is the issue

public static function orderItemInsert($order_ref, $item_code, $uom, $quantity_ordered, $original_price, $product_id)
{

    $post = [
        'order_ref' => $order_ref,
        'item_code' => $item_code,
        'uom' => $uom,
        'quantity_ordered' => $quantity_ordered,
        'original_price' => $original_price,
    ];

    $token = Config::adminToken();
    $authorization = "Authorization: Bearer " . $token;
    $ch5 = curl_init();
    curl_setopt($ch5, CURLOPT_URL, '*************myurl*************');
    curl_setopt($ch5, CURLOPT_HTTPHEADER, array($authorization));
    curl_setopt($ch5, CURLOPT_HEADER, false);
    curl_setopt($ch5, CURLOPT_RETURNTRANSFER, true);
    curl_setopt($ch5, CURLOPT_SSL_VERIFYPEER, false);
    curl_setopt($ch5, CURLOPT_POST, true);
    curl_setopt($ch5, CURLOPT_TIMEOUT, 3000);
    curl_setopt($ch5, CURLOPT_POSTFIELDS, $post);
    $res5 = curl_exec($ch5);
    curl_close($ch5);
    $result = json_decode($res5, true);
    return $result;

}

Sponsor our Newsletter | Privacy Policy | Terms of Service