This function will check if your visitor comes from google and greets the visitor.
function greet_google_referer($url)
{
$message = '';
if (preg_match('#^http:\/\/www\.google\.([a-z]){2,4}\/.+$#', $url))
{
$message = 'Welcome Google user!';
}
return $message;
}
Example of use
echo greet_google_referer(@$_SERVER['HTTP_REFERER']);
Mail this!
- Comments (0)
- PingBacks (0)
- TrackBacks (0)

» Latest comments