title: How to parse <span> content from page using CURL?
body: <p>How to get data from this ?</p>
  
  <pre><code>&lt;td align="right" width="100"&gt;&lt;span class="statsTopHi"&gt;1,234,567&lt;/span&gt;&lt;/td&gt;
  </code></pre>
  
  <p>I need to get statsTopHi data? but dont know how to do it, i'm new to php and dont know anything about curl.</p>
  
  <pre><code>&lt;?php
      $handle = curl_init();
      curl_setopt($handle, CURLOPT_URL, "my url");
      curl_setopt($handle, CURLOPT_RETURNTRANSFER, true);
      $html = curl_exec($handle);
      curl_close($handle);
  
     $DOM = new DOMDocument;
     $DOM-&gt;loadHTML($html);
  
     //get all span
     $items = $DOM-&gt;getElementsByTagName('span');
  
     //display all span text
     for ($i = 0; $i &lt; $items-&gt;length; $i++)
          echo $items-&gt;item($i)-&gt;nodeValue . "&lt;br/&gt;";
  ?&gt;
  </code></pre>
  
  <p>Using this i parse all span content, but need to get only class="statsTopHi"</p>