PHP-Visitor from google
<p>How can I find with p h p if someone comes to my website from google?  </p>

<pre><code>&lt;?php
  if (isset($_COOKIE['source'])) {
      $arr = explode("=",$_COOKIE['source']);
      $_SESSION['source'] = $arr[1];
      unset($_COOKIE['source']);
  }
?&gt;
</code></pre>

<p>This is how I get the source, to know where was the visitor before my site and I want to set <code>$_SESSION['source']="google"</code> if he was searching on Google to find my page.</p>
