How to split traffic [CPA]
2017-03-18, 09:29 PM,
#1
Hello,

Ok, so I want to split my traffic and redirect desktop users to CPAGrip and mobile users to Ogads. I found few methods with I can use, but I don't really know how to set them up properly.

Here are two examples of methods, which I'm trying to setup. Anyone can help me?

PHP Code:
<html>
 
<
head>
  <
script type="text/javascript">
    function 
myFoo() {
      var 
lck false;
      
src "https://blissinstalls.com/script_include.php?id=xxxx"
    
};
 
  
</script>
 
  <script type="text/javascript">
    var ogblock = true;
 
  </script>
  <script type="text/javascript" src="https://www.liveappsearch.com/contentlockers/load.php?id=xxxxxx"></script>
  <script type="text/javascript">
    if (ogblock) window.location.href = "https://www.liveappsearch.com/contentlockers/adblock.php";
 
  </script>
  <?php
 
// At this point, we are checking user agent string for most used mobile devices
 
$ua strtolower($_SERVER['HTTP_USER_AGENT']);
 
$mob strpos($ua,"mobile");
$iphone strpos($ua,"iphone");
$android strpos($ua,"android");
$win strpos($ua,"windows phone");
$palmpre strpos($ua,"webos");
$berry strpos($ua,"blackberry");
$ipod strpos($ua,"ipod");
$ipad strpos($ua,"ipad");
 
if (
$mob || $iphone || $android || $palmpre || $ipod || $berry || $win || $ipad == true) {
   
$url 'myFoo();'// If mobile is detected, we will choose mobile URL
}
else
{
   
$url = echo "<script> myFoo(); </script>"// If no mobile detected, we will choose non-mobile URL
}
 
header("Location: $url"); // Redirect the visitor to chosen URL
?>
</head>
 
<body></body>
 
</html> 


2.
PHP Code:
.....
<
script src="js/main.js"></script>
<!-- *** GATEWAY CODE ***_______________________________________________ -->
        <script>function myFunction() {
            var lck = false;
            src="https://blissinstalls.com/script_include.php?id=xxxxx"
            if(!lck){top.location = 'https://blissinstalls.com/help/ablk.php';
          }
          }
  </script>
                   
<!-- *** /GATEWAY CODE ***_______________________________________________ -->
 
<script type="text/javascript">var ogblock=true;</script>
<script type="text/javascript" src="https://www.liveappsearch.com/contentlockers/load.php?id=xxxxxxxxxxxx"></script>
<script type="text/javascript">if(ogblock) window.location.href = "https://www.liveappsearch.com/contentlockers/adblock.php";</script>
<!-- *** GATEWAY CODE ***_______________________________________________ -->
  <?php
require_once 'Mobile_Detect.php';
$detect = new Mobile_Detect;
 
// Any mobile device (phones or tablets).
if ( $detect->isMobile() ) {
 
$locker 'http://google.com';
}
else
{
   
$locker 'myFunction();'// If no mobile detected, we will choose non-mobile URL
 
}
   
header("Location: $locker");
 
?>
<script>
$("#humanverification").click(function(e) {
    e.preventDefault();
    <?php echo $locker ?>
 
});
</script>
<!-- *** /GATEWAY CODE ***_______________________________________________ -->  
 
</body>
</html> 
Reply
2017-03-18, 09:38 PM,
#2
Am using http://smarturl.it , it works fine for me.
Latest Thanks - View all

Sado(2017-03-18 11:03 PM) 
Reply
2017-03-18, 11:02 PM,
#3
It's looking very nice, but how I can put CPAGrip link there? If I put blissinstalls.com/script_include.php?id=xxxx, It redirect me to wall of text (probably code of locker). Where can I find a normal link, which I can put to smarturl?
Reply
2017-03-19, 02:11 PM,
#4
Even i need a code to split desktop and mobile traffic, following this thread.
Reply
2017-03-19, 07:57 PM,
#5
Direct all traffic to a file called let's say 'redirect.php'

In this file put the mobile detect script.

If user is on mobile redirect to mobilelanding.php if desktop redirect to desktoplanding.php
Latest Thanks - View all

Sado(2017-03-22 03:58 PM) 
Reply
2017-03-22, 02:49 AM,
#6
Do as lancerimpact said, it is very good idea.
Reply
2017-03-22, 08:01 AM,
(This post was last modified: 2017-03-22, 08:02 AM by g3lux.)
#7
you can try this code. You put this where you want to show the button:
Code:
<script type="text/javascript">
testExp = new RegExp('Android|webOS|iPhone|iPad|BlackBerry|Windows Phone|Opera Mini|IEMobile|Mobile' , 'i');
    if (testExp.test(navigator.userAgent)) {
        window.location.href="http://ogadslocker.com/";
        or with button
        document.write("<button onclick='window.location.href=\'http://your ogads direct link \''> Click here </button>");
    }
    else {
        document.write("<button onclick='call_locker();> Click here </button>");
        //this calls the cpagrip locker
        or
        document.write("<button onclick='window.location.href=\'http://your cpagrip file locker \''> Click here </button>");
    }
</script>
Latest Thanks - View all

Sado(2017-03-22 03:58 PM) elitestatus(2017-03-22 10:41 AM) 
Reply


Possibly Related Threads...
Thread Author Replies Views Last Post
  How do I promote CPA Offers via Email marketing ? Med Fd 7 301 4 hours ago
Last Post: maxvolrat
  which cpa network allow adult traffic ?? kalia420 3 52 8 hours ago
Last Post: DrKent
  New to CPA trying to create a keygen vla2110 4 169 2017-10-19, 02:27 PM
Last Post: YTComments
  Question about CPA & CPI 5light 4 200 2017-10-18, 05:51 PM
Last Post: 5light
  What Is The Best CPA Company For Me? shervin 10 257 2017-10-18, 04:29 PM
Last Post: shervin




About Us | Contact Us | CPA Elites | Advertise | Stats | Staff Team

© 2013-2017 CPA Elites Ltd
Enhanced by MyBB and WallBB
Return to top