Home / social / Detect Twitter visitors
  • How to Detect Twitter visitors


    Adding this PHP code to your wordpress theme will display a message to people that visit your site via Twitter.

    ( click code to copy )

    wordpress snippet : PHP

      if (strpos($_SERVER[HTTP_REFERER], "twitter.com") == true) {
        echo "Hello Twitter User!";

    ( WordPress codex functions, hooks, in this snippet. )

  • Shyam Pandey


    Where i have to add this code to work properly Please help