Detect user from Google

WordPress tutorial – Give a special greeting to the users that found your WordPress blog at Google. Adding this PHP code to your wordpress theme will let you display a message to users that found your website via Google.

 

 

  if (strpos($_SERVER[HTTP_REFERER], "google") == true) {
echo "Hello Google User!";
}

 

Be Sociable, Share!

Leave a comment