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

[Tutorial] Cloak users who are not using mobile devices

Discussion in 'Cloaking and Content Generators' started by AntonTretyakov, Jul 17, 2016.

  1. AntonTretyakov

    AntonTretyakov BANNED BANNED

    Joined:
    Jul 15, 2016
    Messages:
    68
    Likes Received:
    7
    Gender:
    Male
    Here is the code, using this you can redirect people who are not using the mobile device to safe page.

    Code:
    <script type="text/javascript">
    "undefined"==typeof window.orientation?window.location.href="http://safe-page.com/";
    </script>
    
     
  2. abhi007

    abhi007 Jr. VIP Jr. VIP

    Joined:
    Aug 31, 2010
    Messages:
    5,700
    Likes Received:
    3,883
    Location:
    Theatre of dreams :)
    Stop this CRAP LOL
     
  3. redarrow

    redarrow Elite Member

    Joined:
    Apr 1, 2013
    Messages:
    4,268
    Likes Received:
    976
    <?php if (
    stristr($ua, "Windows CE") or
    stristr($ua, "Mobile") ) {
    $DEVICE_TYPE="MOBILE";
    }
    if (isset($DEVICE_TYPE) and $DEVICE_TYPE=="MOBILE") {
    $location='YOUR-MOBILE-SITE.com/index.php';
    header ('Location: '.$location);
    exit;
    }else{
    Header('location: http://www.desktop.com');
    exit;
    }
    ?>
     
    • Thanks Thanks x 1
  4. AntonTretyakov

    AntonTretyakov BANNED BANNED

    Joined:
    Jul 15, 2016
    Messages:
    68
    Likes Received:
    7
    Gender:
    Male

    This is also good.

    But don't you think UA is easy to spoof even a noob can do it by download UA spoof extension from chrome store?

    Kudos for posting the code!
     
  5. THUNDERELVI

    THUNDERELVI Elite Member

    Joined:
    Sep 12, 2009
    Messages:
    2,383
    Likes Received:
    2,060
    Gender:
    Male
    Location:
    W3
    This is a simple JS redirect, do you even know what cloaking means?!
     
  6. AntonTretyakov

    AntonTretyakov BANNED BANNED

    Joined:
    Jul 15, 2016
    Messages:
    68
    Likes Received:
    7
    Gender:
    Male
    It redirects based on the condition if it's a mobile visitor or not to a specific page. (using device orientation API)

    Cloaking means redirect bots and reviewers to safe page while actual visitors are redirected to money page.
     
  7. MasterAffiliateX

    MasterAffiliateX BANNED BANNED

    Joined:
    Jun 22, 2014
    Messages:
    10
    Likes Received:
    4
    Stop this crap you're talking about ! We all know you're Xtreme Ads aka Ralph Urner aka FraudBuster.
     
    • Thanks Thanks x 2
  8. AntonTretyakov

    AntonTretyakov BANNED BANNED

    Joined:
    Jul 15, 2016
    Messages:
    68
    Likes Received:
    7
    Gender:
    Male
    Proof?
    Reported for false accusations, bantering someone's product, following all of my threads and posting these accusations everywhere.
     
  9. THUNDERELVI

    THUNDERELVI Elite Member

    Joined:
    Sep 12, 2009
    Messages:
    2,383
    Likes Received:
    2,060
    Gender:
    Male
    Location:
    W3
    Then you know what you shared here isn't the "cloaking" that most users refer to, it's simply a redirect based on the visitor's device type (desktop, mobile or tablet). Anyway, nowadays, you don't even need to perform this kind of check manually, most offers from affiliate networks & most tracking solutions offer device/country/referrer, etc... detection built-in within their platforms.
     
  10. AntonTretyakov

    AntonTretyakov BANNED BANNED

    Joined:
    Jul 15, 2016
    Messages:
    68
    Likes Received:
    7
    Gender:
    Male
    You are correct but I stand corrected.

    Most of those networks use User-Agent based detection. You can easily spoof the user-agent in the browser's configuration. Most people know about it.

    Here we are using device's orientation to detect the device type. But this isn't too obvious and it can be used to cloak well, at least offer a second level of security.

    Anyway, thanks for your feedback.
     
    • Thanks Thanks x 1
  11. THUNDERELVI

    THUNDERELVI Elite Member

    Joined:
    Sep 12, 2009
    Messages:
    2,383
    Likes Received:
    2,060
    Gender:
    Male
    Location:
    W3
    You are right, but normal users/visitors don't even know what a user agent is lol, let alone how to "spoof" it. So, that solution is okay since we (networks/affiliate marketers) target the general population with our offers, not tech savvy webmasters that know how to spoof the user agent. An exception is if you are targeting tech savvy users in the technology or IM/MMO niche. In that case, a second level of detection (like your snippet code) can be implemented as a fail safe to do the job.