SitePoint Sponsor

User Tag List

Results 1 to 4 of 4
  1. #1
    SitePoint Enthusiast
    Join Date
    Feb 2003
    Location
    UK
    Posts
    86
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    $_server['http_referer']

    Why does the $_SERVER['HTTP_REFERER'] variable hardly ever work?

    Is there any way around this?
    I want it to enter the info into a database for a counter but they are almost always blank!

    Some help please

    Thanks,
    Danny

  2. #2
    Prolific Blogger silver trophy Technosailor's Avatar
    Join Date
    Jun 2001
    Location
    Before These Crowded Streets
    Posts
    9,446
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    if you type the url in directly you won't get a referer. If you use Norton's Personal Firewall, you won't get a referer. The only way to get a referer is to enter the page via a link on another page.

    Aaron
    Aaron Brazell
    Technosailor



  3. #3
    SitePoint Zealot
    Join Date
    Mar 2002
    Location
    Perth, Australia
    Posts
    157
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hi Danny

    I have not had many problems with HTTP_REFERRER, there has been the occasional one that says "BLOCKED by xxxxx", unless of course it has been a robot or a direct request for the page in question. If it is blank, then there's not much you can do about it. Some people have software installed that blanks it out. But I wouldn't think the majority should be blank
    Paul Davey
    webmaster for Whitford Church of Christ

  4. #4
    Prolific Blogger silver trophy Technosailor's Avatar
    Join Date
    Jun 2001
    Location
    Before These Crowded Streets
    Posts
    9,446
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    you could use print_r($_SERVER); to see if the error is in a REFERER not being passed or if the error is in the processing of the variable...
    Aaron Brazell
    Technosailor




Bookmarks

Posting Permissions

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