have php script for re-direct but its not working. help please

Discussion in 'PHP' started by JackieM, Oct 20, 2011.

  1. #1
    So i was given the following php redirect script to be able to mask the referrer for a site. But when i added it to my godaddy.com hosting account nothing worked. I honestly don't know php and maybe i'm missing another file but I'm hoping someone here may be able to help me with this. Any help is much appreciated

    File 1
    Index2.php
    Just copy and paste the code below and you’re set.

    <?php
    $site2 = "http://yoursite";
    echo "<body onload=\"javascript:frmClickTracking.submit();\">";
    echo "<form action=\"" . $site2 . "\" method=\"post\"
    name=\"frmClickTracking\">";
    echo "</form>";
    ?>


    Second file
    Index.php
    <?php
    $site1 = "http://yoursite/index2.php";
    $affiliate_link = "paste yours affiliate link";
    if($_SERVER['HTTP_REFERER'] == $site1)
    {
    echo "<body
    onload=\"javascript:frmClickTracking.submit();\">";
    echo "<form action=\"" . $affiliate_link . "\" method=\"post\"
    name=\"frmClickTracking\">";
    echo "</form>";
    }
    ?>
    <html>
    <body>
    <iframe src ="my affiliate link" width="100%" height="100%">
    <p>Your browser does not support iframes.</p>
    </iframe>
    </body>
    </html>
     
    JackieM, Oct 20, 2011 IP
  2. EricBruggema

    EricBruggema Well-Known Member

    Messages:
    1,740
    Likes Received:
    28
    Best Answers:
    13
    Trophy Points:
    175
    #2
    please tell us exactly what you want and how you like to see it..

    This code doesn't tell much!
     
    EricBruggema, Oct 21, 2011 IP