what is the usage of the following function?
<p>Take a look to this function please</p>

<pre><code>function CheckHost()
{
    $url = parse_url($_SERVER['HTTP_REFERER']);
    $host = $url['host'];
    if($host == $_SERVER['SERVER_NAME'])
        return true;
    return false;
}
</code></pre>

<p>i saw it somewhere, but can't understand it's usage.</p>

<p>is it for security reasons, or what?(as i see, it just verify is the last request from the same server as the script)</p>

<p>Thanks for attention</p>
