{"id":104520,"date":"2017-12-13T16:42:56","date_gmt":"2017-12-13T16:42:56","guid":{"rendered":"https:\/\/webkul.com\/blog\/?p=104520"},"modified":"2026-01-19T06:22:04","modified_gmt":"2026-01-19T06:22:04","slug":"simultaneous-curl-requests-in-php","status":"publish","type":"post","link":"https:\/\/webkul.com\/blog\/simultaneous-curl-requests-in-php\/","title":{"rendered":"Simultaneous cURL requests using curl_multi_exec in PHP"},"content":{"rendered":"\n<div class=\"wk-index-wrap\"><h3 class=\"index-title\">Introduction<\/h3><\/div><p class=\"margin-bottom-50\">Why we are discussing this(multiple cURL\u00a0requests\/curl_multi_exec).<\/p>\n\n\n\n<p>When working with APIs in PHP, performance quickly becomes a concern.<br>Many applications need to fetch data from external services based on a list of IDs\u2014customers, orders, products, or users.<\/p>\n\n\n\n<p>If these requests are handled one at a time, response time increases linearly and the application feels slow.<\/p>\n\n\n\n<p>This article explains <strong>how to make simultaneous cURL requests using <\/strong><code>curl_multi_exec<\/code><strong> in PHP<\/strong>, why it matters today, and how to implement it correctly using modern PHP practices.<\/p>\n\n\n\n<p><strong>Why Do Developers Need Multiple cURL Requests?<\/strong><\/p>\n\n\n\n<p>Consider a scenario where:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>An API returns data for <strong>one ID per request<\/strong><\/li>\n\n\n\n<li>You need data for <strong>10 or more IDs<\/strong><\/li>\n<\/ul>\n\n\n\n<p>If each API call takes 300 ms:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>10 requests =&gt; 3 seconds<\/li>\n\n\n\n<li>20 requests =&gt; 6 seconds<\/li>\n<\/ul>\n\n\n\n<p>This delay becomes noticeable very quickly, especially in API-driven or headless applications.<\/p>\n\n\n\n<p><strong>How Does a Traditional cURL Approach Work?<\/strong><\/p>\n\n\n\n<p>The most common implementation uses a loop.<br>Each request waits for the previous one to finish before starting.<\/p>\n\n\n\n<p><strong>Example: Sequential cURL Requests<\/strong><\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\">\/**\n* Webkul Software.\n*\n* @category Webkul\n* @author Webkul\n* @copyright Copyright (c) 2010-2016 Webkul Software Private Limited (https:\/\/webkul.com)\n* @license https:\/\/store.webkul.com\/license.html\n*\/\n$result=array();\nforeach ($ids as $id) {\n  \/\/ URL from which data will be fetched\n  $fetchURL = &#039;https:\/\/webkul.com?customerId=&#039;.$id;\n  $ch = curl_init();\n  curl_setopt($ch, CURLOPT_URL, $fetchURL);\n  curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);\n  $result&#091;] = curl_exec($ch);\n  curl_close($ch);\n}<\/pre>\n\n\n\n<p><strong>Key limitations of this approach<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Requests are blocking<\/li>\n\n\n\n<li>Network latency adds up<\/li>\n\n\n\n<li>Poor performance at scale<\/li>\n\n\n\n<li>Not suitable for modern API-heavy systems<\/li>\n<\/ul>\n\n\n\n<p><strong>What Is <\/strong><code><strong>curl_multi_exec<\/strong><\/code><strong> in PHP <\/strong><strong>and How does it solve the problem<\/strong><strong>?<\/strong><\/p>\n\n\n\n<p><code>curl_multi_exec<\/code> allows PHP to execute <strong>multiple HTTP requests at the same time<\/strong> using a single process.<br>Instead of waiting for one request to complete, PHP:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Sends all requests together<\/li>\n\n\n\n<li>Monitors them asynchronously<\/li>\n\n\n\n<li>Collects responses once they finish<\/li>\n<\/ul>\n\n\n\n<p>The result is a <strong>significant reduction in total execution time<\/strong>.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>How Does <code>curl_multi_exec<\/code> Work Internally?<\/strong><\/h2>\n\n\n\n<p>At a high level:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>A <strong>multi-handle<\/strong> manages multiple cURL handles<\/li>\n\n\n\n<li>Each handle represents one HTTP request<\/li>\n\n\n\n<li>PHP checks which requests are still running<\/li>\n\n\n\n<li>Execution continues until all requests are complete<\/li>\n<\/ul>\n\n\n\n<p>This approach is efficient, stable, and fully supported in modern PHP versions.<\/p>\n\n\n\n<p>PHP provides native support for parallel HTTP requests using <code>curl_multi_exec<\/code>, which is documented in the official PHP manual: <a href=\"https:\/\/www.php.net\/manual\/en\/function.curl-multi-exec.php\" target=\"_blank\" rel=\"noreferrer noopener\">Link<\/a><\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img decoding=\"async\" width=\"800\" height=\"487\" src=\"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2017\/12\/php-curl-life-cycle-flow-1.webp\" alt=\"simultaneous cURL requests using curl_multi_exec in PHP workflow\" class=\"wp-image-519170\" srcset=\"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2017\/12\/php-curl-life-cycle-flow-1.webp 800w, https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2017\/12\/php-curl-life-cycle-flow-1-300x183.webp 300w, https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2017\/12\/php-curl-life-cycle-flow-1-250x152.webp 250w, https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2017\/12\/php-curl-life-cycle-flow-1-768x468.webp 768w\" sizes=\"(max-width: 800px) 100vw, 800px\" loading=\"lazy\" \/><\/figure>\n\n\n\n<p><strong>How to Implement Simultaneous cURL Requests in PHP<\/strong><\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\">\/**\n* Webkul Software.\n*\n* @category Webkul\n* @author Webkul\n* @copyright Copyright (c) 2010-2016 Webkul Software Private Limited (https:\/\/webkul.com)\n* @license https:\/\/store.webkul.com\/license.html\n*\/\n\/\/ array of curl handles\n$multiCurl = array();\n\/\/ data to be returned\n$result = array();\n\/\/ multi handle\n$mh = curl_multi_init();\nforeach ($ids as $i =&gt; $id) {\n  \/\/ URL from which data will be fetched\n  $fetchURL = &#039;https:\/\/webkul.com?customerId=&#039;.$id;\n  $multiCurl&#091;$i] = curl_init();\n  curl_setopt($multiCurl&#091;$i], CURLOPT_URL,$fetchURL);\n  curl_setopt($multiCurl&#091;$i], CURLOPT_HEADER,0);\n  curl_setopt($multiCurl&#091;$i], CURLOPT_RETURNTRANSFER,1);\n  curl_multi_add_handle($mh, $multiCurl&#091;$i]);\n}\n$index=null;\ndo {\n  curl_multi_exec($mh,$index);\n} while($index &gt; 0);\n\/\/ get content and remove handles\nforeach($multiCurl as $k =&gt; $ch) {\n  $result&#091;$k] = curl_multi_getcontent($ch);\n  curl_multi_remove_handle($mh, $ch);\n}\n\/\/ close\ncurl_multi_close($mh);<\/pre>\n\n\n\n<p><strong>Why Is curl_multi_exec Faster for Simultaneous cURL Requests in PHP?<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Requests run in parallel<\/li>\n\n\n\n<li>Network wait time overlaps<\/li>\n\n\n\n<li>Total execution time is close to the slowest request, not the sum of all requests<\/li>\n<\/ul>\n\n\n\n<p><strong>This makes it ideal for<\/strong>:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>API aggregation<\/li>\n\n\n\n<li>Microservices communication<\/li>\n\n\n\n<li>Headless commerce platforms<\/li>\n\n\n\n<li>Background data synchronization<\/li>\n<\/ul>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>What should developers keep in mind?<\/strong><\/h3>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Always set timeouts to avoid hanging requests<\/li>\n\n\n\n<li>Respect API rate limits<\/li>\n\n\n\n<li>Batch large ID lists into smaller groups<\/li>\n\n\n\n<li>Log errors using <code>curl_error()<\/code><\/li>\n\n\n\n<li>Close handles properly to avoid memory leaks<\/li>\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>Are There Alternatives to <code>curl_multi_exec<\/code>?<\/strong><\/h2>\n\n\n\n<p>Yes, depending on your application:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Framework HTTP clients (Laravel, Symfony)<\/li>\n\n\n\n<li>Guzzle with promises<\/li>\n\n\n\n<li>Queue-based background jobs<\/li>\n\n\n\n<li>Event-driven systems like ReactPHP or Swoole<\/li>\n<\/ul>\n\n\n\n<p><strong>However, <\/strong><code><strong>curl_multi_exec<\/strong><\/code><strong> is still a solid choice when you need:<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Low-level control<\/li>\n\n\n\n<li>No external dependencies<\/li>\n\n\n\n<li>Predictable performance<\/li>\n<\/ul>\n\n\n\n<p><strong>When Should You Use <\/strong><code><strong>curl_multi_exec<\/strong><\/code><strong>?<\/strong><\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>Use it when:<\/strong><\/h3>\n\n\n\n<ul class=\"wp-block-list\">\n<li>You need multiple API calls at once<\/li>\n\n\n\n<li>Performance is critical<\/li>\n\n\n\n<li>You want a lightweight solution<\/li>\n<\/ul>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>Avoid it when:<\/strong><\/h3>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Requests require complex retry logic<\/li>\n\n\n\n<li>You need middleware or caching layers<\/li>\n\n\n\n<li>A framework-level client already solves the problem<\/li>\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>Frequently Asked Questions<\/strong><\/h2>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>Is <\/strong><code>curl_multi_exec<\/code><strong> still supported in PHP?<\/strong><\/h3>\n\n\n\n<p>Yes, the curl_multi_exec function is still supported in the latest versions of PHP.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>Does <\/strong><code>curl_multi_exec<\/code><strong> block execution?<\/strong><\/h3>\n\n\n\n<p>No. It uses non-blocking execution while managing active requests.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>Can authentication headers be used?<\/strong><\/h3>\n\n\n\n<p>Yes. Each cURL handle supports its own headers and auth options.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>How many requests should run in parallel?<\/strong><\/h3>\n\n\n\n<p>This depends on server resources and API limits.<br>In most cases, 5\u201320 concurrent requests work well.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>Conclusion<\/strong><\/h2>\n\n\n\n<p>Making Simultaneous cURL requests using curl_multi_exec<strong> in PHP<\/strong> is still a practical and efficient solution for modern applications.<\/p>\n\n\n\n<p>By switching from sequential requests to parallel execution, developers can dramatically improve performance without adding new dependencies. <\/p>\n\n\n\n<p>When used correctly, <code>curl_multi_exec<\/code> remains a valuable tool for API-driven PHP systems.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>When working with APIs in PHP, performance quickly becomes a concern.Many applications need to fetch data from external services based on a list of IDs\u2014customers, orders, products, or users. If these requests are handled one at a time, response time increases linearly and the application feels slow. This article explains how to make simultaneous cURL <a href=\"https:\/\/webkul.com\/blog\/simultaneous-curl-requests-in-php\/\">[&#8230;]<\/a><\/p>\n","protected":false},"author":136,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[13],"tags":[3205],"class_list":["post-104520","post","type-post","status-publish","format-standard","hentry","category-php","tag-curl"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v24.5 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Simultaneous cURL requests using curl_multi_exec in PHP<\/title>\n<meta name=\"description\" content=\"Simultaneous cURL requests using curl_multi_exec, By using curl_multi_exec our app is as slow as the slowest request only.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/webkul.com\/blog\/simultaneous-curl-requests-in-php\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Simultaneous cURL requests using curl_multi_exec in PHP\" \/>\n<meta property=\"og:description\" content=\"Simultaneous cURL requests using curl_multi_exec, By using curl_multi_exec our app is as slow as the slowest request only.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/webkul.com\/blog\/simultaneous-curl-requests-in-php\/\" \/>\n<meta property=\"og:site_name\" content=\"Webkul Blog\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/webkul\/\" \/>\n<meta property=\"article:published_time\" content=\"2017-12-13T16:42:56+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2026-01-19T06:22:04+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/webkul.com\/blog\/wp-content\/uploads\/2017\/12\/php-curl-life-cycle-flow-1.webp\" \/>\n<meta name=\"author\" content=\"Arjun Singh\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@webkul\" \/>\n<meta name=\"twitter:site\" content=\"@webkul\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Arjun Singh\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"3 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/webkul.com\/blog\/simultaneous-curl-requests-in-php\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/webkul.com\/blog\/simultaneous-curl-requests-in-php\/\"},\"author\":{\"name\":\"Arjun Singh\",\"@id\":\"https:\/\/webkul.com\/blog\/#\/schema\/person\/22c9fe3ff42bc7be863f952c9670cb9a\"},\"headline\":\"Simultaneous cURL requests using curl_multi_exec in PHP\",\"datePublished\":\"2017-12-13T16:42:56+00:00\",\"dateModified\":\"2026-01-19T06:22:04+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/webkul.com\/blog\/simultaneous-curl-requests-in-php\/\"},\"wordCount\":618,\"commentCount\":10,\"publisher\":{\"@id\":\"https:\/\/webkul.com\/blog\/#organization\"},\"image\":{\"@id\":\"https:\/\/webkul.com\/blog\/simultaneous-curl-requests-in-php\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/webkul.com\/blog\/wp-content\/uploads\/2017\/12\/php-curl-life-cycle-flow-1.webp\",\"keywords\":[\"curl\"],\"articleSection\":[\"php\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/webkul.com\/blog\/simultaneous-curl-requests-in-php\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/webkul.com\/blog\/simultaneous-curl-requests-in-php\/\",\"url\":\"https:\/\/webkul.com\/blog\/simultaneous-curl-requests-in-php\/\",\"name\":\"Simultaneous cURL requests using curl_multi_exec in PHP\",\"isPartOf\":{\"@id\":\"https:\/\/webkul.com\/blog\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/webkul.com\/blog\/simultaneous-curl-requests-in-php\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/webkul.com\/blog\/simultaneous-curl-requests-in-php\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/webkul.com\/blog\/wp-content\/uploads\/2017\/12\/php-curl-life-cycle-flow-1.webp\",\"datePublished\":\"2017-12-13T16:42:56+00:00\",\"dateModified\":\"2026-01-19T06:22:04+00:00\",\"description\":\"Simultaneous cURL requests using curl_multi_exec, By using curl_multi_exec our app is as slow as the slowest request only.\",\"breadcrumb\":{\"@id\":\"https:\/\/webkul.com\/blog\/simultaneous-curl-requests-in-php\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/webkul.com\/blog\/simultaneous-curl-requests-in-php\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/webkul.com\/blog\/simultaneous-curl-requests-in-php\/#primaryimage\",\"url\":\"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2017\/12\/php-curl-life-cycle-flow-1.webp\",\"contentUrl\":\"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2017\/12\/php-curl-life-cycle-flow-1.webp\",\"width\":800,\"height\":487,\"caption\":\"php curl life cycle\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/webkul.com\/blog\/simultaneous-curl-requests-in-php\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/webkul.com\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Simultaneous cURL requests using curl_multi_exec in PHP\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/webkul.com\/blog\/#website\",\"url\":\"https:\/\/webkul.com\/blog\/\",\"name\":\"Webkul Blog\",\"description\":\"\",\"publisher\":{\"@id\":\"https:\/\/webkul.com\/blog\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/webkul.com\/blog\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/webkul.com\/blog\/#organization\",\"name\":\"WebKul Software Private Limited\",\"url\":\"https:\/\/webkul.com\/blog\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/webkul.com\/blog\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2021\/08\/webkul-logo-accent-sq.png\",\"contentUrl\":\"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2021\/08\/webkul-logo-accent-sq.png\",\"width\":380,\"height\":380,\"caption\":\"WebKul Software Private Limited\"},\"image\":{\"@id\":\"https:\/\/webkul.com\/blog\/#\/schema\/logo\/image\/\"},\"sameAs\":[\"https:\/\/www.facebook.com\/webkul\/\",\"https:\/\/x.com\/webkul\",\"https:\/\/www.instagram.com\/webkul\/\",\"https:\/\/www.linkedin.com\/company\/webkul\",\"https:\/\/www.youtube.com\/user\/webkul\/\"]},{\"@type\":\"Person\",\"@id\":\"https:\/\/webkul.com\/blog\/#\/schema\/person\/22c9fe3ff42bc7be863f952c9670cb9a\",\"name\":\"Arjun Singh\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/webkul.com\/blog\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/fe0556551e188338dece8803a0e8011ee10c9de07e107a91b0a5a8023e8a0894?s=96&d=https%3A%2F%2Fcdnblog.webkul.com%2Fblog%2Fwp-content%2Fuploads%2F2019%2F10%2Fmike.png&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/fe0556551e188338dece8803a0e8011ee10c9de07e107a91b0a5a8023e8a0894?s=96&d=https%3A%2F%2Fcdnblog.webkul.com%2Fblog%2Fwp-content%2Fuploads%2F2019%2F10%2Fmike.png&r=g\",\"caption\":\"Arjun Singh\"},\"url\":\"https:\/\/webkul.com\/blog\/author\/arjun-singh732\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Simultaneous cURL requests using curl_multi_exec in PHP","description":"Simultaneous cURL requests using curl_multi_exec, By using curl_multi_exec our app is as slow as the slowest request only.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/webkul.com\/blog\/simultaneous-curl-requests-in-php\/","og_locale":"en_US","og_type":"article","og_title":"Simultaneous cURL requests using curl_multi_exec in PHP","og_description":"Simultaneous cURL requests using curl_multi_exec, By using curl_multi_exec our app is as slow as the slowest request only.","og_url":"https:\/\/webkul.com\/blog\/simultaneous-curl-requests-in-php\/","og_site_name":"Webkul Blog","article_publisher":"https:\/\/www.facebook.com\/webkul\/","article_published_time":"2017-12-13T16:42:56+00:00","article_modified_time":"2026-01-19T06:22:04+00:00","og_image":[{"url":"https:\/\/webkul.com\/blog\/wp-content\/uploads\/2017\/12\/php-curl-life-cycle-flow-1.webp","type":"","width":"","height":""}],"author":"Arjun Singh","twitter_card":"summary_large_image","twitter_creator":"@webkul","twitter_site":"@webkul","twitter_misc":{"Written by":"Arjun Singh","Est. reading time":"3 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/webkul.com\/blog\/simultaneous-curl-requests-in-php\/#article","isPartOf":{"@id":"https:\/\/webkul.com\/blog\/simultaneous-curl-requests-in-php\/"},"author":{"name":"Arjun Singh","@id":"https:\/\/webkul.com\/blog\/#\/schema\/person\/22c9fe3ff42bc7be863f952c9670cb9a"},"headline":"Simultaneous cURL requests using curl_multi_exec in PHP","datePublished":"2017-12-13T16:42:56+00:00","dateModified":"2026-01-19T06:22:04+00:00","mainEntityOfPage":{"@id":"https:\/\/webkul.com\/blog\/simultaneous-curl-requests-in-php\/"},"wordCount":618,"commentCount":10,"publisher":{"@id":"https:\/\/webkul.com\/blog\/#organization"},"image":{"@id":"https:\/\/webkul.com\/blog\/simultaneous-curl-requests-in-php\/#primaryimage"},"thumbnailUrl":"https:\/\/webkul.com\/blog\/wp-content\/uploads\/2017\/12\/php-curl-life-cycle-flow-1.webp","keywords":["curl"],"articleSection":["php"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/webkul.com\/blog\/simultaneous-curl-requests-in-php\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/webkul.com\/blog\/simultaneous-curl-requests-in-php\/","url":"https:\/\/webkul.com\/blog\/simultaneous-curl-requests-in-php\/","name":"Simultaneous cURL requests using curl_multi_exec in PHP","isPartOf":{"@id":"https:\/\/webkul.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/webkul.com\/blog\/simultaneous-curl-requests-in-php\/#primaryimage"},"image":{"@id":"https:\/\/webkul.com\/blog\/simultaneous-curl-requests-in-php\/#primaryimage"},"thumbnailUrl":"https:\/\/webkul.com\/blog\/wp-content\/uploads\/2017\/12\/php-curl-life-cycle-flow-1.webp","datePublished":"2017-12-13T16:42:56+00:00","dateModified":"2026-01-19T06:22:04+00:00","description":"Simultaneous cURL requests using curl_multi_exec, By using curl_multi_exec our app is as slow as the slowest request only.","breadcrumb":{"@id":"https:\/\/webkul.com\/blog\/simultaneous-curl-requests-in-php\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/webkul.com\/blog\/simultaneous-curl-requests-in-php\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/webkul.com\/blog\/simultaneous-curl-requests-in-php\/#primaryimage","url":"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2017\/12\/php-curl-life-cycle-flow-1.webp","contentUrl":"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2017\/12\/php-curl-life-cycle-flow-1.webp","width":800,"height":487,"caption":"php curl life cycle"},{"@type":"BreadcrumbList","@id":"https:\/\/webkul.com\/blog\/simultaneous-curl-requests-in-php\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/webkul.com\/blog\/"},{"@type":"ListItem","position":2,"name":"Simultaneous cURL requests using curl_multi_exec in PHP"}]},{"@type":"WebSite","@id":"https:\/\/webkul.com\/blog\/#website","url":"https:\/\/webkul.com\/blog\/","name":"Webkul Blog","description":"","publisher":{"@id":"https:\/\/webkul.com\/blog\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/webkul.com\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/webkul.com\/blog\/#organization","name":"WebKul Software Private Limited","url":"https:\/\/webkul.com\/blog\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/webkul.com\/blog\/#\/schema\/logo\/image\/","url":"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2021\/08\/webkul-logo-accent-sq.png","contentUrl":"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2021\/08\/webkul-logo-accent-sq.png","width":380,"height":380,"caption":"WebKul Software Private Limited"},"image":{"@id":"https:\/\/webkul.com\/blog\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/webkul\/","https:\/\/x.com\/webkul","https:\/\/www.instagram.com\/webkul\/","https:\/\/www.linkedin.com\/company\/webkul","https:\/\/www.youtube.com\/user\/webkul\/"]},{"@type":"Person","@id":"https:\/\/webkul.com\/blog\/#\/schema\/person\/22c9fe3ff42bc7be863f952c9670cb9a","name":"Arjun Singh","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/webkul.com\/blog\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/fe0556551e188338dece8803a0e8011ee10c9de07e107a91b0a5a8023e8a0894?s=96&d=https%3A%2F%2Fcdnblog.webkul.com%2Fblog%2Fwp-content%2Fuploads%2F2019%2F10%2Fmike.png&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/fe0556551e188338dece8803a0e8011ee10c9de07e107a91b0a5a8023e8a0894?s=96&d=https%3A%2F%2Fcdnblog.webkul.com%2Fblog%2Fwp-content%2Fuploads%2F2019%2F10%2Fmike.png&r=g","caption":"Arjun Singh"},"url":"https:\/\/webkul.com\/blog\/author\/arjun-singh732\/"}]}},"amp_enabled":true,"_links":{"self":[{"href":"https:\/\/webkul.com\/blog\/wp-json\/wp\/v2\/posts\/104520","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/webkul.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/webkul.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/webkul.com\/blog\/wp-json\/wp\/v2\/users\/136"}],"replies":[{"embeddable":true,"href":"https:\/\/webkul.com\/blog\/wp-json\/wp\/v2\/comments?post=104520"}],"version-history":[{"count":31,"href":"https:\/\/webkul.com\/blog\/wp-json\/wp\/v2\/posts\/104520\/revisions"}],"predecessor-version":[{"id":522480,"href":"https:\/\/webkul.com\/blog\/wp-json\/wp\/v2\/posts\/104520\/revisions\/522480"}],"wp:attachment":[{"href":"https:\/\/webkul.com\/blog\/wp-json\/wp\/v2\/media?parent=104520"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/webkul.com\/blog\/wp-json\/wp\/v2\/categories?post=104520"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/webkul.com\/blog\/wp-json\/wp\/v2\/tags?post=104520"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}