Get certain length of a web page to the server
<p>I am using fopen to get a web page's HTML output, aiming for the "Head" part for some information there (meta tags). The problem is that the script takes forever to load the "whole" page then parse only the head part for the needed info.</p>

<p>Is there a way to get a certain length of the page that guarantees a faster processing? </p>

<p>I am using this:</p>

<pre><code>$page = @fopen($_url, "r");
while (!feof($page)) {
   $content .= fgets($page, 4096);
}
fclose($page);
</code></pre>
