change 'HTTP_REFERER' value

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    change 'HTTP_REFERER' value

    anybody knows if is posible to change the 'HTTP_REFERER' value in php.
    For example if an user in on page a.php and click to page b.php on page b.php i want 'HTTP_REFERER' to be set by me.

    #2
    with php you can edit the headers for HTTP_REFERER, ie. for curl request.
    Advertise your mobile site for FREE with AdTwirl

    Comment


      #3
      I use GET method, but you can use also cookie or session that can handle the refer.

      For a.php
      PHP Code:
      <?php
      $refer 
      $_SERVER["REQUEST_URI"];
      echo 
      '<a href="b.php?refer='.$refer.'>Link to B Page</a>';
      ?>
      For b.php
      PHP Code:
      <?php
      $refer 
      $_GET["refer"];
      echo 
      '<a href="'.$refer.'">Back to referer page</a>';
      ?>
      Hope it helps.
      Btw for accurate referrer use CURL.
      Curl has function to get the referer.
      Did I help you?
      You can help me too
      Your donations will help me finance my studies.

      Comment


        #4
        thx kei but i didn't mean that. I have fixed the problem thx

        Comment


          #5
          $_SERVER['HTTP_REFERER']="me";
          $_SERVER['REQUEST_URI']="me";
          Last edited by sm4rtgl0b3; 01.12.10, 03:30.

          Comment


            #6
            @above. . .You cant maintain state with that :-/ use CURL

            Comment

            Working...
            X