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

Is there a way to block mobile traffic?

Discussion in 'Black Hat SEO' started by Nosence, May 3, 2012.

  1. Nosence

    Nosence Senior Member

    Joined:
    Dec 28, 2010
    Messages:
    925
    Likes Received:
    42
    I really need to be able to block mobile traffic from facebook, but would really preferably block all mobile traffic if possible. It never converts for me and I keep getting complaints for not having a mobile friendly site. This is built on wordpress
     
  2. oxonbeef

    oxonbeef BANNED BANNED

    Joined:
    Jan 4, 2009
    Messages:
    2,242
    Likes Received:
    7,872
    Why don't you install a mobile redirect script and send the traffic to a WAP optimized
    offer or custom 404 page?
    Or a mobile plugin for for WP site?
     
    Last edited: May 3, 2012
  3. azizsalim

    azizsalim BANNED BANNED

    Joined:
    Nov 12, 2011
    Messages:
    215
    Likes Received:
    17
    Would you like to design a mobile based website, if yes then PM me.
     
  4. oxonbeef

    oxonbeef BANNED BANNED

    Joined:
    Jan 4, 2009
    Messages:
    2,242
    Likes Received:
    7,872
    Don't try and sell a service outside of BST.
    Threads are not a place to spam your business.
     
  5. Nosence

    Nosence Senior Member

    Joined:
    Dec 28, 2010
    Messages:
    925
    Likes Received:
    42
    Would happen to have directions or a guide for sending them to a 404 or another offer?

    I honestly have no idea how to do it, but does sound good if I could get all the mobile traffic sent to another offer
     
  6. cashnone

    cashnone BANNED BANNED

    Joined:
    Nov 13, 2008
    Messages:
    177
    Likes Received:
    352
    If you dont know how to code, get hasoffers free version if they still have it, if not just keep getting a free trial every month with new info. They let you redirect based off mobile, and dont block them, send it to a wap email submit even.
     
  7. muxmkt

    muxmkt Power Member

    Joined:
    May 24, 2011
    Messages:
    543
    Likes Received:
    132
    instead of blocking you i can send you a script so u redirect the traffic for me =)

    haha, redirect your traffic for a related mobile offer, dont waste it!
     
  8. brutang

    brutang Junior Member

    Joined:
    Nov 5, 2009
    Messages:
    193
    Likes Received:
    81
    WPtouchPro is a nice wordpress plugin mobile, takes 10 minutes to setup and it looks great. I even added a little bit of custom script to make my mobile site to have an adsense unit that sticks to the bottom when they scroll so it's always there (like you see in games and whatnot) - literally tripled my earnings from mobile visitors vs mobile traffic on the desktop version.
     
  9. Nosence

    Nosence Senior Member

    Joined:
    Dec 28, 2010
    Messages:
    925
    Likes Received:
    42
    I dont understand how to get it redirected though.

    Right now they go to a post on my site, and then have to click on the link to go to the offer.

    How do I get it to change if it's mobile?
     
  10. oxonbeef

    oxonbeef BANNED BANNED

    Joined:
    Jan 4, 2009
    Messages:
    2,242
    Likes Received:
    7,872
    You can redirect using htaccess or with a javascript code.
    Javascript:1
    This mobile redirect script will insert a message at the top
    of the webpage asking users whether they would like to visit
    the mobile optimized version of your website. This message
    will only appear to those users on a mobile device. This script
    works for those users with AND without javascript enabled.


    Code:
    =================================================================
     1. Place all this before the </head> tag
        Remember to change http://www.google.com to your mobile url
    =================================================================
    
    
    <script type="text/javascript">
    <!--
    if (screen.width <= 599) {
    document.write('<div class="alert"><p align="center"><a href="http://www.google.com">Click here</a> for our Mobile site</p></div>');
    }
    
    
    else if (screen.width == 800 && screen.height <= 480) {
    document.write('<div class="alert"><p align="center"><a href="http://www.google.com">Click here</a> for our Mobile site</p></div>');
    }
    
    
    else if (screen.width == 960 && screen.height <= 640) {
    document.write('<div class="alert"><p align="center"><a href="http://www.google.com">Click here</a> for our Mobile site</p></div>');
    }
    //-->
    </script>
    <style type="text/css"> 
    .alert { 
    background:#FCE9C0; 
    border-top:2px solid #DBAC48; 
    border-bottom:2px solid #DBAC48;
    font-family: Arial, Helvetica, sans-serif;
    font-size: 11pt;
    color: #2F393D;
    padding: 6px 5px 6px 5px; 
    } 
    </style>
    
    
    =================================================================
     2. Place this directly under the <body> tag
        Remember to change http://www.google.com to your mobile url
    =================================================================
    
    
    <noscript>
    <div class="alert"><p align="center"><a href="http://www.google.com">Click here</a> for our Mobile site</p></div>
    </noscript>
    
    
    
    Javascript:2
    This mobile redirect script will automatically redirect users
    to the mobile version of your website. Those users without
    javascript enabled will see a message at the top of the webpage
    that they can click on to go to your mobile website.


    Code:
    =================================================================
     1. Place all this before the </head> tag
        Remember to change [URL]http://www.google.com[/URL] to your mobile url
    =================================================================
    
    
    <script type="text/javascript">
    <!--
    if (screen.width <= 599) {
    document.location = "http://www.google.com";
    }
    
    
    else if (screen.width == 800 && screen.height <= 480) {
    document.location = "http://www.google.com";
    }
    
    
    else if (screen.width == 960 && screen.height <= 640) {
    document.location = "http://www.google.com";
    }
    //-->
    </script>
    <style type="text/css"> 
    .alert { 
    background:#FCE9C0; 
    border-top:2px solid #DBAC48; 
    border-bottom:2px solid #DBAC48;
    font-family: Arial, Helvetica, sans-serif;
    font-size: 11pt;
    color: #2F393D;
    padding: 8px 5px 8px 5px; 
    } 
    </style>
    
    
    =================================================================
     2. Place this directly under the <body> tag
        Remember to change [URL]http://www.google.com[/URL] to your mobile url
    =================================================================
    
    
    <noscript>
    <div class="alert"><p align="center"><a href="http://www.google.com">Click here</a> for our Mobile site</p></div>
    </noscript>
    Give me a while I'll dig out a htaccess script for you
    But here's a php script that works well with wordpress.

    Copy and save as "class.mobile.php"

    PHP:
    <?phpclass Mobile {
        
    /**     * @author Webarto.com     * @version 1.1 (added force parameter to force non mobile version on mobile devices)     * @copyright 2011     */
        
    public $agent;    public $device;        public function check()    {
            
    $this->agent $_SERVER['HTTP_USER_AGENT'];        $agent $this->agent;        $mobile false;
            if(
    $_GET['force'] == 1){            setcookie('force'10'/''.'.$_SERVER['HTTP_HOST']);            return;        }        if($_COOKIE['force'] == 1) return;                $agents = array(        'Android',        'Acer',        'Asus',        'Alcatel',        'Blackberry',        'HTC',        'HP',        'Huawei',        'LG',        'Motorola',        'Nokia',        'Palm',        'Samsung',        'SonyEricsson',        'ZTE',        'Mobile',        'iPhone',        'iPod',        'iPad',        'Mini',        'Playstation',        'DoCoMo',        'Benq',        'Vodafone',        'Sharp',        'Kindle',        'Nexus',        'Windows Phone'        );                foreach($agents as $a){            if(stripos($agent$a) !== false){                $mobile true;                $this->device $a;            }        }                return $mobile;            }        public function redirect($url)    {        header('Location: '.$url);    }
    }
    ?>
     
    Last edited: May 4, 2012
  11. the_demon

    the_demon Jr. Executive VIP

    Joined:
    Nov 23, 2008
    Messages:
    3,177
    Likes Received:
    1,563
    Occupation:
    Search Engine Marketing
    Location:
    The Internet
    Here's the code you need (JavaScript)

    Just add it to the page you want mobile users to be redirected from to destination site.

    Code:
    <script type="text/javascript">
    (function(a,b){if(/android.+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|symbian|treo|up\.(browser|link)|vodafone|wap|windows (ce|phone)|xda|xiino/i.test(a)||/1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\-(n|u)|c55\/|capi|ccwa|cdm\-|cell|chtm|cldc|cmd\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\-s|devi|dica|dmob|do(c|p)o|ds(12|\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\-|_)|g1 u|g560|gene|gf\-5|g\-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd\-(m|p|t)|hei\-|hi(pt|ta)|hp( i|ip)|hs\-c|ht(c(\-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\-(20|go|ma)|i230|iac( |\-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc\-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|e\-|e\/|\-[a-w])|libw|lynx|m1\-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m\-cr|me(di|rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(\-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)\-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|\-([1-8]|c))|phil|pire|pl(ay|uc)|pn\-2|po(ck|rt|se)|prox|psio|pt\-g|qa\-a|qc(07|12|21|32|60|\-[2-7]|i\-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h\-|oo|p\-)|sdk\/|se(c(\-|0|1)|47|mc|nd|ri)|sgh\-|shar|sie(\-|m)|sk\-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h\-|v\-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl\-|tdg\-|tel(i|m)|tim\-|t\-mo|to(pl|sh)|ts(70|m\-|m3|m5)|tx\-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|\-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(\-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|xda(\-|2|g)|yas\-|your|zeto|zte\-/i.test(a.substr(0,4)))window.location=b})(navigator.userAgent||navigator.vendor||window.opera,'http://MY-DOMAIN-GOES-HERE.com');
    </script>
    
    Simply replace: http://MY-DOMAIN-GOES-HERE.com
    with a mobile affiliate offer and bank. :)
     
  12. Nosence

    Nosence Senior Member

    Joined:
    Dec 28, 2010
    Messages:
    925
    Likes Received:
    42
    Does anyone have any suggestions for mobile offers? Is there a network that is best or better?

    I've never done anything mobile