Y T Nuke  
Results 1 to 4 of 4
Can Some please give me the script to redirect my MAC and Windows user to ...
  1. #1
    jutt29's Avatar
    jutt29 is offline Junior Member
    Join Date
    Sep 2010
    Location
    Internet!
    Posts
    159
    Reputation
    14
    Thanks
    17
    Thanked 28 Times in 27 Posts

    Default Url Redirection Based on Operating System?

    Can Some please give me the script to redirect my MAC and Windows user to different Urls?
    Thanks

  2. #2
    Autumn's Avatar
    Autumn is offline Elite Member
    Join Date
    Nov 2010
    Location
    Spamville
    Posts
    2,030
    Reputation
    1778
    Thanks
    518
    Thanked 2,361 Times in 1,092 Posts

    Default Re: Url Redirection Based on Operating System?

    Code:
    <?php
    
    $windows_url = 'http://www.microsoft.com/';
    $mac_url     = 'http://www.apple.com/';
    $other_url   = 'http://www.lemonparty.org/';
    
    $user_agent = $_SERVER['HTTP_USER_AGENT'];
    
    if(preg_match('/microsoft|window/i', $user_agent)) {
    	header("Location: $windows_url", true, 301);
    } elseif(preg_match('/mac|os x/i', $user_agent)) {
    	header("Location: $mac_url", true, 301);
    } else {
    	header("Location: $other_url", true, 301);
    }
    
    ?>
    Pretty self explanatory really. Fill in your urls up the top and include it before the opening <head> tag on your page.
    "An ounce of action is worth a ton of theory." - Ralph Waldo Emerson

  3. The Following 2 Users Say Thank You to Autumn For This Useful Post:

    jutt29 (12-17-2011), paulcarter97 (12-17-2011)

  4. #3
    paulcarter97's Avatar
    paulcarter97 is offline Jr. VIP
    Join Date
    Nov 2011
    Posts
    395
    Reputation
    19
    Thanks
    14
    Thanked 34 Times in 33 Posts

    Default Re: Url Redirection Based on Operating System?

    Nice script, quick question. Why would you want this kind of redirrect ?

  5. #4
    Autumn's Avatar
    Autumn is offline Elite Member
    Join Date
    Nov 2010
    Location
    Spamville
    Posts
    2,030
    Reputation
    1778
    Thanks
    518
    Thanked 2,361 Times in 1,092 Posts

    Default Re: Url Redirection Based on Operating System?

    Quote Originally Posted by paulcarter97 View Post
    Nice script, quick question. Why would you want this kind of redirrect ?
    Probably so you can show ads that are targeted to each operating system, eg. show Windows users some anti-virus shit and Mac users some other crapware like MacKeeper. You wouldn't necessarily have to redirect - you could just identify the user agent as belonging to a particular OS and then just show an ad for that platform in your normal page.
    "An ounce of action is worth a ton of theory." - Ralph Waldo Emerson

Dot Gov Backlinks Sale


Smarter Submit

Similar Threads

  1. Keywords based on architect, and search terms
    By tejsin in forum White Hat SEO
    Replies: 8
    Last Post: 01-10-2012, 10:05 AM
  2. My 1 One Of A kind Money System
    By dumdum4gumgum in forum Making Money
    Replies: 45
    Last Post: 01-06-2012, 11:48 PM
  3. Is Magic article Submitter a good software after amr?
    By maxken75 in forum Black Hat SEO Tools
    Replies: 30
    Last Post: 03-27-2011, 01:26 PM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
  SEnukeX SEO Software
Proudly Powered by Hostwinds.com Web Hosting Click Here For Exclusive BHW Discounts!

Cheap Web Hosting


1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76