заголовок HTTP_REFERER

Discussion in 'PHP' started by evil_Joe, 12 Apr 2012.

  1. evil_Joe

    evil_Joe New Member

    Joined:
    2 Apr 2012
    Messages:
    5
    Likes Received:
    0
    Reputations:
    0
    Подскажите кроссбраузерный метод вынудить браузер клиента не отсылать HTTP_REFERER ?
    (существует ли он для Opera?)
     
  2. daniel777

    daniel777 Member

    Joined:
    8 Jul 2010
    Messages:
    520
    Likes Received:
    90
    Reputations:
    37
    Вроде бы так:
    Code:
    <html>
    <body style="width:100%; height:100%;" onMouseMove="__();">
    <script>
    function __(){
    _ = 'document';
    $ = window.open();
    $[_].write('<meta http-equiv="refresh" content="0;url=http://ssylka-kuda-redirektim-bez-referera.com/">');
    $[_].close();
    }
    </script>
    </body>
    </html>
     
  3. evil_Joe

    evil_Joe New Member

    Joined:
    2 Apr 2012
    Messages:
    5
    Likes Received:
    0
    Reputations:
    0
    Вполне достаточно просто
    Code:
    <meta http-equiv="refresh" content="0;url=http://ssylka-kuda-redirektim-bez-referera.com/">
    Но это не работает в opera.
     
  4. banned

    banned Banned

    Joined:
    20 Nov 2006
    Messages:
    3,325
    Likes Received:
    1,199
    Reputations:
    252
    Можно посмотреть в исходный код ачата
    PHP:
    //############################3
    // Открытие ссылки без реферера
    function openEx(url)
    {
      
    window.open();
      
    w.document.write('<meta http-equiv="refresh" content="0;url='+url+'">');
      
    w.document.close();
      return 
    false;
    }
     
  5. evil_Joe

    evil_Joe New Member

    Joined:
    2 Apr 2012
    Messages:
    5
    Likes Received:
    0
    Reputations:
    0
    Тот же самый код. Опера передаёт реферера.
     
  6. banned

    banned Banned

    Joined:
    20 Nov 2006
    Messages:
    3,325
    Likes Received:
    1,199
    Reputations:
    252
    А так?
     
  7. evil_Joe

    evil_Joe New Member

    Joined:
    2 Apr 2012
    Messages:
    5
    Likes Received:
    0
    Reputations:
    0
    тоже самое
     
  8. gibson

    gibson Elder - Старейшина

    Joined:
    24 Feb 2006
    Messages:
    392
    Likes Received:
    247
    Reputations:
    88
    только через header('Location: url'); иначе в Опере реф передается
     
  9. evil_Joe

    evil_Joe New Member

    Joined:
    2 Apr 2012
    Messages:
    5
    Likes Received:
    0
    Reputations:
    0
    302 редирект вообще никак не сказывается на HTTP_REFERER. Причем не только в опере.
     
  10. Kaimi

    Kaimi Well-Known Member

    Joined:
    23 Aug 2007
    Messages:
    1,761
    Likes Received:
    816
    Reputations:
    230
    If a website is accessed from a HTTP Secure (HTTPS) connection and a link points to anywhere except another secure location, then the referer field is not sent.
     
    _________________________
Loading...