PHP function to check if browser referer is empty?
<p>I was using this function </p>

<pre><code>ereg('http://.',$_SERVER['HTTP_REFERER']) != 1
</code></pre>

<p>To check if the visitor clicked a link or did enter directly to this particular page.</p>

<p>I see now that ereg is deprecated, but have no knowledge of php to convert this to maybe preg_match?</p>

<p>Is there any other way to check if the referer is empty?</p>

<p>Thanks a lot!!</p>
