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 6 of 6

Thread: referral page

  1. #1
    New Coder
    Join Date
    Feb 2003
    Posts
    63
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Thumbs up referral page

    hello

    if i have a page, say thispage.php and wants to check where does the previous page comes from, how can i do it???

    any php functions?

  • #2
    Regular Coder
    Join Date
    Feb 2003
    Location
    East Side/West Side
    Posts
    118
    Thanks
    0
    Thanked 0 Times in 0 Posts
    $HTTP_REFERER...

    echo "$HTTP_REFERER<br>";

    Would print out the last page accessed

  • #3
    Regular Coder
    Join Date
    Jun 2002
    Location
    Ontario, Canada
    Posts
    183
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Or $_SERVER["HTTP_REFERER"] (looks cooler )
    Offtone.com - In the works...

  • #4
    New Coder
    Join Date
    Feb 2003
    Posts
    63
    Thanks
    0
    Thanked 0 Times in 0 Posts
    thanks...but i even tried printing as

    print_r($_SERVER); to print all the para in $_SERVER[..] but still I cannot find HTTP_REFERER....

    or if I echo "$_SERVER['HTTP_REFERER']";

    it did not give me anyresult

  • #5
    New Coder
    Join Date
    Jan 2004
    Posts
    24
    Thanks
    0
    Thanked 0 Times in 0 Posts
    same thing here...how come i dont have $HTTP_REFERER??

    i get this error:

    Notice: Undefined variable: HTTP_REFERER in test.php on line 2


    ooppss...i got it now.. ignore this!
    Warm Regards,
    Jacky

  • #6
    Senior Coder Nightfire's Avatar
    Join Date
    Jun 2002
    Posts
    4,265
    Thanks
    6
    Thanked 48 Times in 48 Posts
    kenny873:
    Did you try accessing the page from a different url? Also, some firewalls, browsers etc will prevent the referrer being shown/recorded.

    <edit>Nevermind, just seen this is a very old thread, thought it was recent</edit>


  •  

    Posting Permissions

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