[CPA] How I made $12,000 in one month uncontested

[复制链接]
查看: 232   回复: 4
发表于 2012-5-17 23:32:52 | 显示全部楼层 |阅读模式
Intro: this isn't a rehashed method. this is some real deal stuff

Basically the method was to create an incentive gateway type affiliate program that's only for adult traffic - I would rebroker offers from cpa networks and blank the refferer onto my review type landing page.

Here is the entire setup:

In one directory create the the following .htaccess file
  1. <FilesMatch "\.(js)$">
  2. AddHandler application/x-httpd-php .js
  3. </FilesMatch>
复制代码
This will make it possible to run php scripts inside your javascript file. No publisher is going to trust you if tell them include php scripts from your server.

Next is the actual gateway code. Save this file as the gateway.js file - it's going to be the file that they will include. I didn't do too much work on it so the unlock method is a timer.
  1. var loaded = true;



  2. var hasloaded = false;
  3. var delay_time = 0;
  4. var unscroll_time = 200;
  5. var a = 0;
  6. hide_ie_embeds = 0;

  7. function setCookie(c_name,value,expiredays)
  8. {
  9. var exdate=new Date();
  10. exdate.setDate(exdate.getDate()+expiredays);
  11. document.cookie=c_name+ "=" +escape(value)+
  12. ((expiredays==null) ? "" : ";expires="+exdate.toUTCString());
  13. }
  14. function getCookie(c_name)
  15. {
  16. if (document.cookie.length>0)
  17.   {
  18.   c_start=document.cookie.indexOf(c_name + "=");
  19.   if (c_start!=-1)
  20.     {
  21.     c_start=c_start + c_name.length+1;
  22.     c_end=document.cookie.indexOf(";",c_start);
  23.     if (c_end==-1) c_end=document.cookie.length;
  24.     return unescape(document.cookie.substring(c_start,c_end));
  25.     }
  26.   }
  27. return "";
  28. }
  29. function getScrollPos(){
  30.     var topScroll;
  31.     if (self.pageYOffset) {
  32.         topScroll = self.pageYOffset;
  33.     }else if (document.documentElement and& document.documentElement.scrollTop){
  34.         topScroll = document.documentElement.scrollTop;
  35.     }else if (document.body) {
  36.         topScroll = document.body.scrollTop;
  37.     }
  38.     return topScroll;
  39. }

  40. function getPageSize(){
  41.   var xScroll, yScroll;
  42.     if (window.innerHeight and& window.scrollMaxY) {   
  43.         xScroll = window.innerWidth + window.scrollMaxX;
  44.         yScroll = window.innerHeight + window.scrollMaxY;
  45.     } else if (document.body.scrollHeight > document.body.offsetHeight){ // all but Explorer Mac
  46.         xScroll = document.body.scrollWidth;
  47.         yScroll = document.body.scrollHeight;
  48.     } else { // Explorer Mac...would also work in Explorer 6 Strict, Mozilla and Safari
  49.         xScroll = document.body.offsetWidth;
  50.         yScroll = document.body.offsetHeight;
  51.     }
  52.     var windowWidth, windowHeight;
  53.     if (self.innerHeight) {    // all except Explorer
  54.         if(document.documentElement.clientWidth){
  55.             windowWidth = document.documentElement.clientWidth;
  56.         } else {
  57.             windowWidth = self.innerWidth;
  58.         }
  59.         windowHeight = self.innerHeight;
  60.     } else if (document.documentElement and& document.documentElement.clientHeight) { // Explorer 6 Strict Mode
  61.         windowWidth = document.documentElement.clientWidth;
  62.         windowHeight = document.documentElement.clientHeight;
  63.     } else if (document.body) { // other Explorers
  64.         windowWidth = document.body.clientWidth;
  65.         windowHeight = document.body.clientHeight;
  66.     }   
  67.     // for small pages with total height less then height of the viewport
  68.     if(yScroll < windowHeight){
  69.         pageHeight = windowHeight;
  70.     } else {
  71.         pageHeight = yScroll;
  72.     }
  73.     // for small pages with total width less then width of the viewport
  74.     if(xScroll < windowWidth){   
  75.         pageWidth = xScroll;        
  76.     } else {
  77.         pageWidth = windowWidth;
  78.     }
  79.     arrayPageSize = new Array(pageWidth,pageHeight,windowWidth,windowHeight)
  80.     return arrayPageSize;
  81. }
  82. function alerts(a) {
  83. alert(a);
  84. }

  85. function addLoadEvent(func) { // credit to Scott Andrew
  86.       var oldonload = window.onload;
  87.       if (typeof window.onload != 'function'){
  88.       window.onload = func;
  89.       }else{
  90.           window.onload = function(){ oldonload(); func(); }
  91.       }
  92. }

  93. // -----------


  94. function initGateway() {
  95.   
  96.    
  97.   if(window.location.hash) { exit; }
  98.   else {
  99.   if (hasloaded != true){
  100.     hasloaded = true;
  101.     if (delay_time > 0) {
  102.         setTimeout("loadGateway()", delay_time*1000);
  103.     } else {
  104.         loadGateway();
  105.     }
  106.     addLoadEvent(check());
  107.     }
  108.     }
  109.   }

  110. function loadGateway(){
  111.   // the Body must be ready before we can begin
  112.     var objBody = document.getElementsByTagName("body")[0];
  113.     if (objBody == null) {
  114.         setTimeout("loadGateway();", 200);
  115.         return false;
  116.     }
  117.   var overlayDiv = document.getElementById('gw_overlay');
  118.     toggleEmbeds(0);
  119.     var mainDiv = document.getElementById('gw_main');
  120.     mainDiv.style.display = 'block';
  121.     var arrayPageSize = getPageSize();
  122.     overlayDiv.style.height = (arrayPageSize[1] + 'px');
  123.     if (navigator.appName == 'Microsoft Internet Explorer') {
  124.       overlayDiv.style.width = (arrayPageSize[0] + 'px');
  125.     }
  126.     overlayDiv.style.display = 'block';
  127.     document.getElementById('gw_iframe').style.display = '';
  128.     document.getElementById('gw_iframe').src = <?php echo ""http://www.eikasoft.com/publisher/get.php?id=".$_GET["id"].'";' ?>
  129.     if (unscroll_time > 0){ unscroll(); }
  130. }

  131. function unscroll(){
  132.     scroll(0,0);
  133.     if (unscroll_time > 0) {
  134.         setTimeout("unscroll();", unscroll_time);
  135.     }   
  136. }

  137. function toggleEmbeds(newstate) {
  138.     if (newstate==0){
  139.     v_visibility = 'hidden';
  140.     v_wmode = 'opaque';
  141.     f_display = 'none';
  142.   }else{
  143.     v_visibility = 'visible';
  144.     v_wmode = 'window';
  145.     f_display = '';
  146.   }
  147.    
  148.     var embeds = document.getElementsByTagName('embed');
  149.     for (var ems = document.embeds, i = 0, em; em = ems[i]; i++) {
  150.     if (navigator.appName == 'Microsoft Internet Explorer') {
  151.             if (hide_ie_embeds){ em.style.visibility = v_visibility; }
  152.             em.setAttribute('wmode', v_wmode);
  153.         }else{
  154.           em.setAttribute('wmode', v_wmode);
  155.           if (newstate==0){
  156.               var nx = em.nextSibling, pn = em.parentNode;
  157.               pn.removeChild(em);
  158.               pn.insertBefore(em, nx);
  159.           }
  160.         }
  161.     }   
  162. }
  163. function removeElement(divNum) {
  164.   var d = document.getElementById('myDiv');
  165.   var olddiv = document.getElementById(divNum);
  166.   d.removeChild(olddiv);
  167. }



  168. var out = '';
  169. out = '<style type="text/css">';
  170.       out += '#gw_overlay { position:absolute;top:0;left:0; width:100%; z-index:1999002; background-color:#000000; filter:alpha(opacity=50); opacity:0.50; -moz-opacity:0.50; }';
  171.   out += '#gw_main { margin-top:100px; width:100%; text-align:center; position:absolute;top:0;left:0; z-index:1999003; }';
  172. out += '</style>';
  173. out += '<div id="myDiv"> </div>';
  174. out += '<div id="gw_overlay" style="display:none;"></div>';

  175. out += '<div id="gw_main" style="display:none;">';
  176.   out += '<iframe width="650" height="420" id="gw_iframe" src="" scrolling="no" allowtransparency="true" frameborder="0" style="overflow-x:hidden;overflow-y:hidden; background-color:transparent; z-index:1999005;" scrollbars="no"></iframe>';
  177.   out += '</div>';

  178. document.write(out);
  179. if (delay_time != -1){ addLoadEvent(initGateway); }


  180. function check()
  181. {
  182.     if(window.location.hash) {
  183.         location.reload(true);   
  184.     }
  185.     else {
  186.         setTimeout('check()', 10);
  187.     }
  188. }
复制代码
 楼主| 发表于 2012-5-17 23:33:34 | 显示全部楼层
Next I was going to use pyronauts code at first so here is what I have. You don't have to use it you can simply design your own. So for now it iframes mine onto his beacuse I didn't bother editing it since it worked fine.
  1. <script src="http://ajax.microsoft.com/ajax/jquery/jquery-1.4.2.min.js" type="text/javascript"></script>
  2. <script type="text/javascript">

  3. var Delay = 70;//Seconds after them clicking the link, the gateway vanishes.
  4. function HttpRequest(url){
  5.     var pageRequest = false //variable to hold ajax object
  6.     /*@cc_on
  7.    @if (@_jscript_version >= 5)
  8.       try {
  9.       pageRequest = new ActiveXObject("Msxml2.XMLHTTP")
  10.       }
  11.       catch (e){
  12.          try {
  13.          pageRequest = new ActiveXObject("Microsoft.XMLHTTP")
  14.          }
  15.          catch (e2){
  16.          pageRequest = false
  17.          }
  18.       }
  19.    @end
  20. @*/

  21. if (!pageRequest and& typeof XMLHttpRequest != 'undefined')
  22.    pageRequest = new XMLHttpRequest()

  23. if (pageRequest){ //if pageRequest is not false
  24.    pageRequest.open('GET', url, false) //get page synchronously
  25.    pageRequest.send(null)
  26.    embedpage(pageRequest)
  27.    }
  28. }

  29. function embedpage(request){
  30. //if viewing page offline or the document was successfully retrieved online (status code=2000)
  31. if (window.location.href.indexOf("http")==-1 || request.status==200)
  32.    document.write(request.responseText)
  33. }



  34.     function getCookie(c_name)
  35.     {
  36.         if (document.cookie.length>0)
  37.         {
  38.             c_start=document.cookie.indexOf(c_name + "=");
  39.             if (c_start!=-1)
  40.             {
  41.                 c_start=c_start + c_name.length+1;
  42.                 c_end=document.cookie.indexOf(";",c_start);
  43.                 if (c_end==-1) c_end=document.cookie.length;
  44.                 return unescape(document.cookie.substring(c_start,c_end));
  45.             }
  46.         }
  47.     return "";
  48.     }

  49.     function setupgateway()
  50.     {
  51.         

  52.         var Left = $(window).width() /2;
  53.         Left = Left - $('#gatewaydiv').width()/2;

  54.         var Top = $(window).height() /2;
  55.         Top = Top - $('#gatewaydiv').height()/2;

  56.         $('#gatewaydiv').css('top', Top+'px').css('left', Left+'px').css('display', 'inline');
  57.         $('#gatewayDimmer').width($('html').width());
  58.         $('#gatewayDimmer').height($('html').height());
  59.         $('#gatewayDimmer').css('display','block');
  60.         
  61.     }
  62.     function setCookie(c_name,value,expiredays)
  63.     {
  64.         var exdate=new Date();
  65.         exdate.setDate(exdate.getDate()+expiredays);
  66.         document.cookie=c_name+ "=" +escape(value)+
  67.         ((expiredays==null) ? "" : ";expires="+exdate.toUTCString());
  68.     }

  69.     function removegateway()
  70.     {
  71.         var url = document.referrer;
  72.         url += "#c8t";
  73.         top.location.href = url;
  74.         

  75.     }

  76.     $(document).ready(function()
  77.     {
  78.         $('.offerlink').click(function()
  79.         {
  80.             setTimeout('removegateway()', Delay*500);
  81.         });

  82.         setupgateway();
  83.     });
  84. </script>
  85. <style>


  86.     #gatewaydiv
  87.     {
  88.         
  89.         background-repeat:no-repeat;
  90.         width:500px;
  91.         height:300px;
  92.         padding:20px;
  93.         position:absolute;
  94.         display:none;
  95.         background-color:#FFFFFF;
  96.         border:solid 4px gray;
  97.         text-align:center;
  98.         font-family:arial;
  99.     }

  100.     #gatewaydiv h1
  101.     {
  102.         font-size:35px;
  103.         color:#cc0000;
  104.     }

  105.     #gatewayMessage
  106.     {
  107.         font-size:18px;
  108.     }

  109.     .offerlink
  110.     {
  111.         color:red;
  112.         font-weight:bold;
  113.     }
  114. as
  115.     #OfferList
  116.     {
  117.         margin:0;
  118.         padding:0;
  119.     }

  120.     #OfferList
  121.     {
  122.         list-style:none;
  123.     }

  124.     #gatewayDimmer
  125.     {
  126.         background-color:#000000;
  127.         opacity:0.8;
  128.         opacity:0.8;
  129.         display:none;
  130.         width=100%;
  131.         height=100%;
  132.         position:absolute;
  133.         top:0;
  134.     }
  135.     }
  136. </style>





  137. <div id="gatewaydiv">
  138.     <ul id="OfferList">
  139.     <h1>High quality content area</h1>
  140.     <span id="gatewayMessage">The following page is a high quality content page and requires that you complete a short survey to continue.</span>
  141.     <br /><br />
  142.     <li><a href="http://www.eikasoft.com/publisher/go.php?id=<?php echo $_GET["id"]; ?>&offer=fb" class="offerlink" target="blank">Own a facebook? Complete a short survey on Facebook.</a></li>
  143.     <li><a href="http://www.eikasoft.com/publisher/go.php?id=<?php echo $_GET["id"]; ?>&offer=iphone" class="offerlink" target="blank">Test and keep an iPhone 4</a></li>
  144.     <li><a href="http://www.eikasoft.com/publisher/go.php?id=<?php echo $_GET["id"]; ?>&offer=ringtone" class="offerlink" target="blank">Test out our hottest ringtones</a></li>
  145.     <li><a href="http://www.eikasoft.com/publisher/go.php?id=<?php echo $_GET["id"]; ?>&offer=airlines" class="offerlink" target="blank">Try a free flight with our airlines</a></li>
  146.     </ul>
  147.     <br />
  148.     This is a measure taken to protect us from bots and leechers. Thank you for understanding.<br />
  149.    
  150. </div>
复制代码
回复 支持 反对

使用道具 举报

 楼主| 发表于 2012-5-17 23:34:18 | 显示全部楼层
Using both of our codes is like double security I guess. Name that file "get.php". This file will be what the original gateway.js will call.

The following file should be named go.php
  1. <?php


  2. $id = $_GET["id"];
  3. $offer = $_GET["offer"];


  4. if($offer == "fb")
  5. {
  6. header("Location: http://www.offshorebp.com/short-facebook-quiz/?mn=8403&type=facebookads$id");
  7. }
  8. else if($offer == "ringtone")
  9. {
  10. header("Location: http://www.offshorebp.com/ringtones/?mn=8403&type=adbrite$id");
  11. }
  12. else if($offer == "iphone")
  13. {
  14. header("Location: http://www.offshorebp.com/free-iphone-4/?mn=8403&type=adwords$id");
  15. }
  16. else if($offer == "airlines")
  17. {
  18. header("Location: http://www.offshorebp.com/southwest-airlines/?mn=8403&type=adbrite$id");
  19. }
  20. ?>
复制代码
回复 支持 反对

使用道具 举报

 楼主| 发表于 2012-5-17 23:34:45 | 显示全部楼层
This file will allow you to redirect to to cpa redirector or such when someone clicks a link. You'll also need an edited version of cpa redirector that I'll post in a little bit.

The last file will be update.php. This will be check your postback. You will need to edit it to how you setup mysql to add money to a user. I'll be helping people set that up in the post below. Here is mine:
  1. <?php
  2. if($_SERVER['REMOTE_ADDR'] == "174.122.2.34")
  3. {
  4. include('"');

  5. $id = ereg_replace( '[^0-9]+', '', $_GET["subid1"]);
  6. $commission= $_GET["commission"];

  7. echo $id . "<br>";
  8. echo $commission;



  9. $e = new eika();
  10. $commission = $commission / 2;
  11. echo "<br>". $commission;
  12. $e->AddPoints($id, 5, $commission);
  13. }
  14. else echo "Error";

  15. ?>
复制代码
回复 支持 反对

使用道具 举报

 楼主| 发表于 2012-5-17 23:36:28 | 显示全部楼层
Design your gateway, affiliate program, home page, and publisher area to look well. Don't be scared to pay some money for a design. The places where I promoted my gateway were GFY and JBM - both adult affiliate forums. If I forgot anything I'll edit it in add it later. You never know you could end up getting requests from real advertisers and ending up as CEO of a large adult affiliate network. Like all methods get it while it's good!


Let me know how it works

http://www.contentgeneration.org/cpa-redirector-2/
  1. <input type="hidden"  name="mn" value="' . get_option('wp_magicnumber') . '" />
  2. <input type="hidden"  name="type" value="'. $_GET["type"] .'" />
  3. <input type="hidden"  name="type" value="'. $_GET["type2"] .'" />
  4. </form>
  5. <script language="JavaScript">
  6.     document.getElementById(\'form1\').submit();</script></body></html>';
  7.         return true;
  8.         exit();
  9. }

  10.     if ($_POST['mn']==get_option('wp_magicnumber')){

  11.             echo '<html><head><META NAME="ROBOTS" CONTENT="NOINDEX, NOFOLLOW">
  12. </head><body><form action="'. get_permalink($post->ID) . '" method="post" id="form1">

  13. <input type="hidden"  name="mn" value="' . get_option('wp_magicnumber') . get_option('wp_magicnumber') . '" />
  14. <input type="hidden"  name="type" value="'. $_POST["type"] .'" />
  15. <input type="hidden"  name="type" value="'. $_POST["type2"] .'" />
  16. </form>
  17. <script language="JavaScript">
  18.     document.getElementById(\'form1\').submit();</script></body></html>';
  19.         return true;
  20.         exit();        
  21. }

  22.     if ($_POST['mn']==(get_option('wp_magicnumber').get_option('wp_magicnumber'))){
  23.         $x = get_post_meta($post->ID, "theurl", true) . $_POST["type"] . $_POST["type2"] ;
  24.         header( 'Location: ' . $x);
  25.         exit();
  26.     }

  27.     return false;
  28. }
复制代码
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则