1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Send Traffic Through Site As Referer

Discussion in 'Cloaking and Content Generators' started by kraze98nyc, Nov 19, 2008.

  1. kraze98nyc

    kraze98nyc Newbie

    Joined:
    Nov 14, 2008
    Messages:
    26
    Likes Received:
    5
    Occupation:
    Internet Marketing - Duh
    Location:
    USA
    I'd like to send traffic from ads placed on another site. I would like the traffic to appear to come from a static page on my website.

    If the visitor clicks link on orig site:

    orig site link > my site > my site landing page > aff site (all automatically)

    If the visitor goes directly to my site landing page it appears as a static landing page, no auto redirect.

    Any thoughts how to do this?

    thanks!
     
  2. drkenneth

    drkenneth Executive VIP

    Joined:
    Nov 13, 2008
    Messages:
    285
    Likes Received:
    176
    Occupation:
    Developer/Entrepreneur
    Location:
    USA
    This is definitely possible with some creative PHP coding :)

    This is what will happen:
    -User clicks the advertisement on the original site
    -The user will land on PAGE1 of your site, which will have a javascript redirect to PAGE2 (javascript redirects yield a referer that equals the page it's on)
    -PAGE2 two will check the referer to see where the user came from. If they came from PAGE1, then the page will display another javascript redirect to send them to your affiliate site. (With PAGE2 being the referer.) If they came from anywhere else, the page will display its normal static content.

    It is also possible to send the orig ad directly to page two, assuming you know all the places your ad will be displaying. (And so what referer the user will have when they click it.) This depends fully on how the ads work/where they are--but the method I listed with 2 pages should work in any case.
     
  3. swinter84

    swinter84 Junior Member

    Joined:
    Nov 7, 2008
    Messages:
    153
    Likes Received:
    110
    Anybody got any scriptage on this? Am very interested...
     
  4. drkenneth

    drkenneth Executive VIP

    Joined:
    Nov 13, 2008
    Messages:
    285
    Likes Received:
    176
    Occupation:
    Developer/Entrepreneur
    Location:
    USA
    I'll put up some sample PHP code in about 4ish hours. (Don't have time atm.)
     
  5. drkenneth

    drkenneth Executive VIP

    Joined:
    Nov 13, 2008
    Messages:
    285
    Likes Received:
    176
    Occupation:
    Developer/Entrepreneur
    Location:
    USA
    The first page is simple--redirects you to the 2nd page (one that will appear to have content):
    HTML:
    <script language=Javascript>
      window.location.href='content5.php';
    </script>
    
    The second page shows content if the referer isn't the 1st page. If it is, then it sends them to the destination. (In this case it's the referer.php script.)
    PHP:
    <?php
    //Compare the referer to the page they SHOULD come from
    if ( $_SERVER['HTTP_REFERER'] == "http://www.drkenneth.mobi/demos/bouncer5.php" || $_SERVER['HTTP_REFERER'] == "http://drkenneth.mobi/demos/bouncer5.php" )

    {
    //Bounce the user to the destination  
    print <<<END
      <script language=Javascript>
        window.location.href='referer.php';
      </script>
    END;
    }
    else
    {
    //Act innocent--they didn't come through the bounce!
    print <<<END
    Hey!<br>
    This is an innocent little page!<br>
    No scripts or anything!<br>
    Just lots of awesome content!<br>
    People are just going to click links and buy stuff, cuz we have REAL traffic from HERE!<br>
    Just a nice, happy, user friendly referral link to <a href="referer.php">referer.php</a><br>
    See, click it! It's what all your viewers are doing!
    END;
    }
    ?>
    referer.php is the final landing page--ie your affiliate


    Here is a demo I'm temporary hosting:
    http://www.drkenneth.mobi/demos/bouncer5.php (page 1, i.e. the page you'd link an ad to)
    http://www.drkenneth.mobi/demos/content5.php (page 2, if you go right to it it's just innocent content ;) )
    http://www.drkenneth.mobi/demos/referer.php (the affiliate--will see page 2 as the referer)

    These are safe to look at--do not load any affiliates or anything bad.

    BTW: I am currently creating an application to make generating advanced bouncer scripts like this (and MUCH more complicated) quick and easy--so if you have any other ideas/good features for bouncers let me know :)

    Enjoy
    +rep/thanks is apprecaited :D
     
    • Thanks Thanks x 4
    Last edited: Nov 20, 2008
  6. GeoffreyF67

    GeoffreyF67 Guest

    Hmm that's pretty neat. I used .htaccess, auto form submit with javascript and php to create mine.

    G-Man
     
  7. kraze98nyc

    kraze98nyc Newbie

    Joined:
    Nov 14, 2008
    Messages:
    26
    Likes Received:
    5
    Occupation:
    Internet Marketing - Duh
    Location:
    USA
    I'm getting an error on line 6 of the second page...

    Parse error: syntax error, unexpected T_SL in xxxxxxxxxxxxx on line 6
     
  8. dekadent30

    dekadent30 Power Member

    Joined:
    Nov 10, 2008
    Messages:
    516
    Likes Received:
    145
    htaccess do the same as php code, i tried
     
  9. drkenneth

    drkenneth Executive VIP

    Joined:
    Nov 13, 2008
    Messages:
    285
    Likes Received:
    176
    Occupation:
    Developer/Entrepreneur
    Location:
    USA
    So, make sure the final identifier (the three <<<) does not have any whitespaces before or after it--it's picky.
     
  10. kraze98nyc

    kraze98nyc Newbie

    Joined:
    Nov 14, 2008
    Messages:
    26
    Likes Received:
    5
    Occupation:
    Internet Marketing - Duh
    Location:
    USA
    Still not working for me... i fixed the line but your website version isnt working either.... hmmm
     
  11. drkenneth

    drkenneth Executive VIP

    Joined:
    Nov 13, 2008
    Messages:
    285
    Likes Received:
    176
    Occupation:
    Developer/Entrepreneur
    Location:
    USA
    Hmm... weird. I am hosting that same code on my site and it's working fine. Still the same error?
     
  12. kraze98nyc

    kraze98nyc Newbie

    Joined:
    Nov 14, 2008
    Messages:
    26
    Likes Received:
    5
    Occupation:
    Internet Marketing - Duh
    Location:
    USA
    Works in firefox, not IE7 for me... anyone else have the same problem?
     
  13. drkenneth

    drkenneth Executive VIP

    Joined:
    Nov 13, 2008
    Messages:
    285
    Likes Received:
    176
    Occupation:
    Developer/Entrepreneur
    Location:
    USA
    Oh so it's an actual webbrowser issue? Does it give an error or just not work?
     
  14. kraze98nyc

    kraze98nyc Newbie

    Joined:
    Nov 14, 2008
    Messages:
    26
    Likes Received:
    5
    Occupation:
    Internet Marketing - Duh
    Location:
    USA
    when starting at bouncer5.php, in firefox it works as it should.
    In IE it goes until the content5.php and stops there.
     
  15. drkenneth

    drkenneth Executive VIP

    Joined:
    Nov 13, 2008
    Messages:
    285
    Likes Received:
    176
    Occupation:
    Developer/Entrepreneur
    Location:
    USA
    Perhaps you have javascript disabled in IE? (Hence causing the redirect not to work.)
    In this case you can just add a normal link saying "Proceed" or something on the redirect page so that people w/o javascript enabled can still get where they're going AND still show that page as the referer.
     
  16. drkenneth

    drkenneth Executive VIP

    Joined:
    Nov 13, 2008
    Messages:
    285
    Likes Received:
    176
    Occupation:
    Developer/Entrepreneur
    Location:
    USA
    IE7 does not handle javascript redirect referers the same way, so here's a revised version of my script:


    The first page is simple--redirects you to the 2nd page (one that will appear to have content):
    HTML:
     <body onload="javascript:frmTaco.submit();"> 
     <form action="content5.php" method="get" name="frmTaco">
     </form>
    


    The second page shows content if the referer isn't the 1st page. If it is, then it sends them to the destination. (In this case it's the referer.php script.)
    PHP:
    <?php
    //Compare the referer to the page they SHOULD come from
    if ( $_SERVER['HTTP_REFERER'] == "http://www.drkenneth.mobi/demos/bouncer5.php" || $_SERVER['HTTP_REFERER'] == "http://drkenneth.mobi/demos/bouncer5.php" )

    {
    //Bounce the user to the destination  
    print <<<END
     <body onload="javascript:frmTaco.submit();"> 
     <form action="referer.php" method="get" name="frmTaco">
     </form>
    END;
    }
    else
    {
    //Act innocent--they didn't come through the bounce!
    print <<<END
    Hey!<br>
    This is an innocent little page!<br>
    No scripts or anything!<br>
    Just lots of awesome content!<br>
    People are just going to click links and buy stuff, cuz we have REAL traffic from HERE!<br>
    Just a nice, happy, user friendly referral link to <a href="referer.php">referer.php</a><br>
    See, click it! It's what all your viewers are doing!
    END;
    }
    ?>
    Hope that helps anyone who was having any problems in IE7. Enjoy :)
     
    • Thanks Thanks x 2
  17. marketraise

    marketraise Newbie

    Joined:
    May 7, 2008
    Messages:
    25
    Likes Received:
    1
    thank you for the information this is very good information which help me i to increased our knowledge.
     
  18. bvb

    bvb Regular Member

    Joined:
    Aug 23, 2007
    Messages:
    244
    Likes Received:
    10
    does this work? and can the affiliate check source code and see something fishy
     
  19. drkenneth

    drkenneth Executive VIP

    Joined:
    Nov 13, 2008
    Messages:
    285
    Likes Received:
    176
    Occupation:
    Developer/Entrepreneur
    Location:
    USA
    Nope. The decision of what is sent to the user is done serverside. I.E. when the page is visited the normal page will display. There will be NOTHING fishy they will be able to look at. (Including source.) The only way for them to see the page acts as a redirect is if they find the original ad/link somehow and actually go through the bounces.
     
  20. binkage

    binkage Newbie

    Joined:
    Jan 26, 2010
    Messages:
    6
    Likes Received:
    0
    Greetings,

    I am running the same exact link redirect setup but it is done in php. Is there some way to make this happen purely in php and php headers? I was successful doing this in curl but I lose the IP information, which looks fishy to affiliates. I am not allowed to use Javascript, meta tags or any other html.

    Let me know if this can be done.

    Thanks
    Kind regards