<?xml version="1.0"?>
<rss version="2.0">
  <channel>
    <title>PHPDeveloper.org</title>
    <link>http://www.phpdeveloper.org</link>
    <description>Up-to-the Minute PHP News, views and community</description>
    <language>en-us</language>
    <pubDate>Fri, 16 May 2008 05:22:23 -0500</pubDate>
    <ttl>30</ttl>
    <item>
      <title><![CDATA[Stoyan Stefanov's Blog: Simultaneous HTTP requests in PHP with cURL]]></title>
      <guid>http://www.phpdeveloper.org/news/9660</guid>
      <link>http://www.phpdeveloper.org/news/9660</link>
      <description><![CDATA[<p>
On his blog today, <i>Stoyan Stefanov</i> has <a href="http://www.phpied.com/simultaneuos-http-requests-in-php-with-curl/">a howto posted</a> on a trick he figured out to get a PHP script to grab data from multiple resources at one time - with cURL.
</p>
<blockquote>
The basic idea of a Web 2.0-style "mashup" is that you consume data from several services, often from different providers and combine them in interesting ways. This means you often need to do more than one HTTP request to a service or services. [...] Using the curl_multi* family of cURL functions you can make those requests simultaneously. This way your app is as slow as the slowest request, as opposed to the sum of all requests. And that's something.
</blockquote>
<p>
He <a href="http://www.phpied.com/simultaneuos-http-requests-in-php-with-curl/">includes example code</a> that loops through a given array of resources and executes the fetch, brining the results back into a result array. To illustrate, he also includes two types of examples of fetching content - one for GET and another for POST.
</p>]]></description>
      <pubDate>Tue, 19 Feb 2008 09:34:00 -0600</pubDate>
    </item>
  </channel>
</rss>
