Php Referer Spoofing

Discussion in 'PHP' started by ropulos, Jun 18, 2008.

  1. #1
    Hi,

    I Need to change the referer to a custom,

    so site.com will see just the custom referer i want.

    then if I type the url directly I go to disney.com

    How can I do to spoof it for this php ?

    <?php
    if ($_SERVER['HTTP_REFERER'] != "")
    {
    header("Location: http://www.site.com");
    }
    else
    {
    header("Location: http://www.disney.com");
    }
    ?><html><head><title>redirect</title><meta http-equiv=Content-Type content="text/html; charset=iso-8859-1"></head><body></body></html>


    thx
     
    ropulos, Jun 18, 2008 IP
  2. Danltn

    Danltn Well-Known Member

    Messages:
    679
    Likes Received:
    36
    Best Answers:
    0
    Trophy Points:
    120
    #2
    This won't work. The referer is set by the browser (and is a header sent.)

    If you want to spoof headers with PHP, you'll have to rely on cURL or similar.

    Dan
     
    Danltn, Jun 18, 2008 IP
  3. ropulos

    ropulos Active Member

    Messages:
    57
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    91
    #3
    Yes, but someone told me is working using cURL.

    How can I do it?
     
    ropulos, Jun 18, 2008 IP
  4. ropulos

    ropulos Active Member

    Messages:
    57
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    91
    #4
    Someone is able to use cURL ?
     
    ropulos, Jun 18, 2008 IP
  5. ropulos

    ropulos Active Member

    Messages:
    57
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    91
    #5
    I can Pay. Let me know
     
    ropulos, Jun 18, 2008 IP
  6. Plazey

    Plazey Member

    Messages:
    81
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    43
    #6
    Ask melol2, i've seen some of his code. He used curl in it. PM him. He's online right now, doing some quick coding for me.
     
    Plazey, Jun 18, 2008 IP
  7. Danltn

    Danltn Well-Known Member

    Messages:
    679
    Likes Received:
    36
    Best Answers:
    0
    Trophy Points:
    120
    #7
    Alternatively, send me a PM. I can do almost everything needed from these forums.

    Dan
     
    Danltn, Jun 19, 2008 IP
  8. ropulos

    ropulos Active Member

    Messages:
    57
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    91
    #8
    thx,

    I posted to you

    Ropulos
     
    ropulos, Jun 23, 2008 IP