PHP Redirect..

Discussion in 'PHP' started by marieg, Feb 20, 2008.

  1. #1
    Can you see the referring url if you use this php redirect code.

    <?php
    header( 'Location: http://www.url.com' ) ;
    ?>

    or you will see "no referring url"?
     
    marieg, Feb 20, 2008 IP
  2. LittleJonSupportSite

    LittleJonSupportSite Peon

    Messages:
    386
    Likes Received:
    20
    Best Answers:
    0
    Trophy Points:
    0
    #2
    The referrer header is sent by the users browser, not the web server.

    So no, you will not see the ref. If you want to see that then you will need to use curl or fsckopen
     
    LittleJonSupportSite, Feb 20, 2008 IP
  3. marieg

    marieg Active Member

    Messages:
    695
    Likes Received:
    5
    Best Answers:
    0
    Trophy Points:
    58
    #3
    Thank you for your response.

    Can you give me a sample code for curl or fsckopen. Or maybe a site where I can understand this more.
     
    marieg, Feb 20, 2008 IP
  4. Ares

    Ares Member

    Messages:
    47
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    45
    #4
    php.net is the best source for php functions !

    php.net/curl
    php.net/fsockopen
     
    Ares, Feb 22, 2008 IP