Referring keyword PHP script?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Voodoo
    ♥ ♦ ♣ ♠
    • Sep 2002
    • 10600

    #1

    Referring keyword PHP script?

    Does anyone have that snippet of code that was floating around that captures the referring keyword from the search results on Google / Yahoo etc... and displays the keyword/phrase on the landing page?

    If so, please post.

    Thanks.

    "I'm selflessly supporting the common good, but only coincidentally looking out for No.1."
  • SmokeyTheBear
    ►SouthOfHeaven
    • Jun 2004
    • 28609

    #2
    heres a really simple one , im sure there are better ways to do it

    Code:
    <?php
    $ref=@$HTTP_REFERER; 
    $exr = explode("q=",$ref);
    $exk = explode("&",$exr[1]);
    $sekeyword = "$exk[0]";
    echo $sekeyword;
    ?>
    hatisblack at yahoo.com

    Comment

    • Voodoo
      ♥ ♦ ♣ ♠
      • Sep 2002
      • 10600

      #3
      Originally posted by SmokeyTheBear
      heres a really simple one , im sure there are better ways to do it

      Code:
      <?php
      $ref=@$HTTP_REFERER; 
      $exr = explode("q=",$ref);
      $exk = explode("&",$exr[1]);
      $sekeyword = "$exk[0]";
      echo $sekeyword;
      ?>
      Nice, thanks!

      "I'm selflessly supporting the common good, but only coincidentally looking out for No.1."

      Comment

      Working...