http referrer

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Brian
    Senior Member
    • Apr 2000
    • 252

    http referrer

    I want to show a special message (html) to people who came from certain other sites linked to ours. What would the php code be to do this on the page?

    Thanks in advanced!!

    -BW
    << This Space Intentionally Left Blank >>
  • Mark Hensler
    Senior Member
    • Feb 2001
    • 570

    #2
    PHP Code:
    if (eregi("someplace.com",$HTTP_REFERRER)) {
       echo 
    "Hi people from someplace.com!\n";

    Comment

    • Brian
      Senior Member
      • Apr 2000
      • 252

      #3
      thanks!!

      how can I do it to show all other people a differnt file.

      if (eregi("someplace.com",$HTTP_REFERRER)) {
      echo "Hi people from someplace.com!\n";
      }

      Also how would I include files in it instead of text:

      ie if they were from xx url they would get welcome.php (inserted on that page), and if not from site xxx they would get (intro.php inserted on that page)

      Thanks so much!!!
      << This Space Intentionally Left Blank >>

      Comment

      • Mark Hensler
        Senior Member
        • Feb 2001
        • 570

        #4
        PHP Code:
        if (eregi("someplace.com",$HTTP_REFERRER)) {
           include 
        "welcome.php";
        }
        else {
           include 
        "intro.php";

        Comment

        widgetinstance 262 (Related Topics) skipped due to lack of content & hide_module_if_empty option.
        Working...