Portal   Forum   Members   Market   Gallery   Events

Hmm...clan questions

Discussion in 'MSC Clan' started by gekko, Feb 25, 2001.

  1. gekko

    gekko Peasant

    Joined:
    Feb 19, 2001
    Messages:
    648
    Likes Received:
    0
    Market Rating:
    0
    No, it's possible using PHP. Now i'm no PHP expert, but i'm assuming it would be something like
    Code:
    <?php
    
    $checkos = getenv("HTTP_USER_AGENT");
    if (preg_match("/Mac_PowerPC/", "$checkos")) {
    include('macusers.php');
    } else {
    include('others.php');
    }
    
    ?>
    
    Then you would make a file "macusers.php" which is your site, and then "others.php" which would be the one you want for Windows, Linux, and any other non-Mac users.

    I'm not sure if that would work, but it looks right. Feel free to try it.
     
  2. cowofwar

    cowofwar Peasant

    Joined:
    Jun 14, 2000
    Messages:
    13,721
    Likes Received:
    18
    Market Rating:
    0
    Um.........I don't know anything about PHP. Nevermind the fact that my server doesn't support it.

    Once I move it to os x then I'll enslave you and force you to work on my site.
     
  3. gekko

    gekko Peasant

    Joined:
    Feb 19, 2001
    Messages:
    648
    Likes Received:
    0
    Market Rating:
    0
    HOLY S***!

    I actually got it right :)

    Anyway, i just ran upstairs to my PowerBook and created a quick test. That code worked perfectly.

    Cleck here to test it

    :D

    Tested on a PC running Windows Me and a Mac using OS 9.1.
     

Hitometer: 53,590,339 since 1995