• Posted: 2010-09-10
  • Author: Filip Stefansson
  • Tags:

Detect Twitter-user

  1.  
  2.  
  3.  
  4.  
  5.  
<?php
if (strpos($_SERVER[HTTP_REFERER], "twitter.com") == true) {
    echo "Hello Twitter User!";
}
?>

Instructions:

If you want to get all the visitors from Twitter a special greeting, add the following to your WordPress blog:


Share this snippet

If you like this snippet, share it with friends!