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

    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. )