a function from google pr check code
<p>i am new to php. to improve the skill of it. i searched some examples to practice it. now,i found one.</p>

<p><a href="http://www.brightyoursite.com/blog/2010/06/01/use-php-to-get-google-page-rank/" rel="nofollow">http://www.brightyoursite.com/blog/2010/06/01/use-php-to-get-google-page-rank/</a></p>

<p>but the code for me is hard to understand.</p>

<pre><code>function StrToNum($Str, $Check, $Magic) {
        $Int32Unit = 4294967296; 

        $length = strlen($Str);
        for ($i = 0; $i &lt; $length; $i++) {
            $Check *= $Magic;



            if ($Check &gt;= $Int32Unit) {
                $Check = ($Check - $Int32Unit * (int) ($Check / $Int32Unit));
                //if the check less than -2^31
                $Check = ($Check &lt; -2147483648)? ($Check + $Int32Unit) : $Check;
            }
            $Check += ord($Str{$i});
        }
        return $Check;
    }
</code></pre>

<p>i don't understand it well. expect someon can help me?</p>

<p>1, what's the use and meaning of this line <code>$Int32Unit = 4294967296;</code> </p>

<p>2,what's the for loop do? what's the use of this function.</p>
