[Req] HTML Script

Discussion in 'Programming' started by Philomina, Mar 25, 2008.

  1. #1
    Hi,

    Is there a HTML script I can use to send those who
    use Firefox to one page and those who use
    IE to another page with different content but
    both from the same url.

    Thanks.
     
    Philomina, Mar 25, 2008 IP
  2. jBud

    jBud Peon

    Messages:
    387
    Likes Received:
    8
    Best Answers:
    0
    Trophy Points:
    0
    As Seller:
    100% - 0
    As Buyer:
    100% - 0
    #2
    jBud, Mar 25, 2008 IP
  3. jBud

    jBud Peon

    Messages:
    387
    Likes Received:
    8
    Best Answers:
    0
    Trophy Points:
    0
    As Seller:
    100% - 0
    As Buyer:
    100% - 0
    #3
    ps what exactly are you trying to do? is it because the site looks differently in IE, FF,
    if that's the case and you have css issues there are easier ways
     
    jBud, Mar 25, 2008 IP
  4. Philomina

    Philomina Peon

    Messages:
    105
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    As Seller:
    100% - 0
    As Buyer:
    100% - 0
    #4
    Thanks jBud for your replies.
    I have sent you a pm.
     
    Philomina, Mar 25, 2008 IP
  5. Danltn

    Danltn Well-Known Member

    Messages:
    679
    Likes Received:
    36
    Best Answers:
    0
    Trophy Points:
    120
    As Seller:
    100% - 0
    As Buyer:
    100% - 0
    #5
    function browser_code()
    {
        // Returns the browser code as a LL string, could do with expansion.
        // Example usage: echo browser_code();
    
        $ua = strtolower($_SERVER['HTTP_USER_AGENT']);
        $browser = array("firefox" => "FF", "icab" => "IC", "msie" => "IE", "opera" => "OP", "safari" => "SA");
        foreach ($browser as $b => $c)
        {
            if (strpos($ua, $b) !== false)
            {
                return $c;
            }
        }
    }
    PHP:
    Completely untested! Enjoy :p
     
    Danltn, Mar 26, 2008 IP