Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 5 of 5
  1. #1
    Regular Coder
    Join Date
    Jun 2002
    Location
    USA
    Posts
    308
    Thanks
    0
    Thanked 0 Times in 0 Posts

    pass a url in a recommend script using $HTTP_REFERER

    I'm trying to pass a url in a recommend script using $HTTP_REFERER This isn't working:


    $referrer = $HTTP_REFERER;


    $emailmessage = "Hello,\n\r[name] thought you would like to visit the following page: [referrer]

  • #2
    Senior Coder Nightfire's Avatar
    Join Date
    Jun 2002
    Posts
    4,265
    Thanks
    6
    Thanked 48 Times in 48 Posts
    That's because it's $_SERVER['HTTP_REFERER']

  • #3
    Regular Coder
    Join Date
    Jun 2002
    Location
    USA
    Posts
    308
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Hmm, here's how it's coming through in the email:

    Hello,

    Ashley thought you would like to visit the following page: [referrer]

    Here's what I'm using:

    PHP Code:
    $referrer $_SERVER['HTTP_REFERER'];

    $webmasterEmail 'test@xyz.net';        // Your email address.

    $emailsubject 'Website Recommendation from [name] ([email])';        //Email subject line.

    $emailmessage "Hello,\n\r[name] thought you would like to visit the following page: [referrer]\n\n[url]";        // Message in email body. 

  • #4
    Senior Coder Nightfire's Avatar
    Join Date
    Jun 2002
    Posts
    4,265
    Thanks
    6
    Thanked 48 Times in 48 Posts
    PHP Code:
    $emailmessage "Hello,\n\r[name] thought you would like to visit the following page: ".$referrer."\n\n[url]";        // Message in email body. 

  • #5
    Regular Coder
    Join Date
    Jun 2002
    Location
    USA
    Posts
    308
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Works, thanks!


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •