Alternative to php preg_match to pull data from an external website?
<p>I want to extrat the content of a specific div in an external webpage, the div looks like this:</p>

<pre><code>&lt;dt&gt;Win rate&lt;/dt&gt;&lt;dd&gt;&lt;div&gt;50%&lt;/div&gt;&lt;/dd&gt;
</code></pre>

<p>My target is the "50%". I'm actually using this php code to extract the content:</p>

<pre><code>function getvalue($parameter,$content){
    preg_match($parameter, $content, $match);
    return $match[1];
    };
$parameter = '#&lt;dt&gt;Score&lt;/dt&gt;&lt;dd&gt;&lt;div&gt;(.*)&lt;/div&gt;&lt;/dd&gt;#';
$content = file_get_contents('https://somewebpage.com');
</code></pre>

<p>Everything works fine, the problem is that this method is taking too much time, especially if I've to use it several times with diferents $content.</p>

<p>I would like to know if there's a better (faster, simplier, etc.) way to acomplish the same function? Thx!</p>
