title: How do I display content grabbed from external websites?
body: <p>How do I grab pieces of content from external websites and display them on my website? (Similar to what an RSS feed or other aggregator does).</p>
  
  <p>For example, say I want to display items from another website's calendar:</p>
  
  <p><strong>Other website:</strong></p>
  
  <pre><code>&lt;h1&gt;Here's our calendar:&lt;/h1&gt;
  
  &lt;div class="calendar_item"&gt;
    &lt;h2&gt;Boston Marathon&lt;/h2&gt;
    &lt;p class="date"&gt;June 23, 2012&lt;/p&gt;
    &lt;p class="description"&gt;This marathon is 26.2 miles and lots of fun.&lt;/p&gt;
  &lt;/div&gt;
  
  &lt;div class="calendar_item"&gt;    
    &lt;h2&gt;Irish Pub Crawl&lt;/h2&gt;
    &lt;p class="date"&gt;July 17, 2012&lt;/p&gt;
    &lt;p class="description"&gt;Shamrocks and green things are super-fun.&lt;/p&gt;
  &lt;/div&gt;
  
  &lt;div class="calendar_item"&gt;
    &lt;h2&gt;Tim's Birthday&lt;/h2&gt;
    &lt;p class="date"&gt;August 25, 2012&lt;/p&gt;
    &lt;p class="description"&gt;It's Tim's birthday, yo.&lt;/p&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p><strong>My website:</strong></p>
  
  <pre><code>&lt;h1&gt;Here's a feed of some calendar items from someone else's website:&lt;/h1&gt;
  
  &lt;div class="event_title"&gt;Boston Marathon&lt;/div&gt;
  &lt;div class="event_date"&gt;June 23, 2012&lt;/div&gt;
  &lt;div class="event_description"&gt;This marathon is 26.2 miles and lots of fun.&lt;/div&gt;
  
  &lt;div class="event_title"&gt;Irish Pub Crawl&lt;/div&gt;
  &lt;div class="event_date"&gt;July 17, 2012&lt;/div&gt;
  &lt;div class="event_description"&gt;Shamrocks and green things are super-fun.&lt;/div&gt;
  
  &lt;div class="event_title"&gt;Tim's Birthday&lt;/div&gt;
  &lt;div class="event_date"&gt;August 25, 2012&lt;/div&gt;
  &lt;div class="event_description"&gt;It's Tim's birthday, yo.&lt;/div&gt;
  </code></pre>
  
  <p>Here's what I've tried (using MAMP):</p>
  
  <pre><code>&lt;?php
  
  $url = "http://example.com";
  
  $page = curl($url);
  
  $pattern = '%
  &lt;h2&gt;(.+?)&lt;/h2&gt;
  %i';
  
  preg_match($pattern,$page,$matches);
  
  print_r($matches);
  
  ?&gt;
  </code></pre>
  
  <p>...which prints: </p>
  
  <pre><code>Array ( )
  </code></pre>
  
  <p>The tutorials/etc. I've viewed include ambiguous answers like "try cURL". This seems so simple, but I'm a stumped noob.</p>
  
  <p>Thanks in advance, guys :)</p>