title: Printing only specific details from another website using cURL
body: <p>I am using this PHP code to display some data from another web page using get_data($url) and it works fine. Here is my code:</p>
  
  <pre><code>    &lt;?php
      function get_data($url, $post='')
      {
          $ch = curl_init($url);
          if(!empty($post))
         {
          curl_setopt($ch,CURLOPT_POST,true);
          curl_setopt($ch,CURLOPT_POSTFIELDS,$post);
          curl_setopt($ch,CURLOPT_REFERER,$url);
         }
          curl_setopt($ch,CURLOPT_COOKIEJAR,realpath('.').'/cookies.txt');
          curl_setopt($ch,CURLOPT_COOKIEFILE,realpath('.').'/cookies.txt');
          curl_setopt($ch,CURLOPT_REFERER,$url);
          curl_setopt($ch, CURLOPT_USERAGENT, 'Mozilla/5.0 (Windows; U; Windows NT 5.1; ru; rv:1.9.0.7) Gecko/2009021910 Firefox/3.0.7 (.NET CLR 3.5.30729)');
          curl_setopt($ch,CURLOPT_CONNECTTIMEOUT,10);
          curl_setopt($ch,CURLOPT_RETURNTRANSFER,true);
          curl_setopt($ch,CURLOPT_FOLLOWLOCATION,true);
          return curl_exec($ch);
      }
      set_time_limit(0);
      $min = $_GET['min'];
      $max = $_GET['max'];
      for ($i=$min; $i&lt;=$max; $i++)
      {
              $url = 'http://main.com/login.php?access=/even_detail.php?tid=' . $i;
              get_data($url);
              $post = '&amp;user=admin&amp;pass=admin';
              echo get_data($url, $post)."&lt;br /&gt;";
      }
      ?&gt;
  </code></pre>
  
  <p>And for example this is the HTML of <a href="http://main.com/login.php?access=/even_detail.php?tid=" rel="nofollow">the link</a>:</p>
  
  <pre><code>    &lt;html&gt;
      &lt;head&gt;
      &lt;/head&gt;
      &lt;body&gt;
      &lt;div align="left"&gt;
      &lt;pre&gt;
      Array
      (
          [dst_eventId] =&gt; 123
          [dst_eventState] =&gt; MD
          [dst_eventZip] =&gt; 12345
          [dst_eventHowManyKids] =&gt; 20
          [dst_eventHowManyAdults] =&gt; 5
          [dst_evenHolder] =&gt; Willcock
      )
      &lt;/pre&gt;
      &lt;/div&gt;
      &lt;/body&gt;
      &lt;/html&gt;
  </code></pre>
  
  <p>Now i want to display on my page with my php code above using get_data() for these rows (not all rows)</p>
  
  <pre><code>        [dst_eventId] =&gt; 123
          [dst_eventState] =&gt; MD
          [dst_evenHolder] =&gt; Willcock
  </code></pre>
  
  <p>How can I achieve this?</p>