Results 1 to 3 of 3

Thread: PHP finding the OS [resolved]

  1. #1

    Thread Starter
    Frenzied Member Acidic's Avatar
    Join Date
    Sep 2003
    Location
    UK
    Posts
    1,090

    PHP finding the OS [resolved]

    How can PHP find the OS running on the visitor's system?

    How can you edit this on your local machine to make the server think you have a different OS?
    Last edited by Acidic; May 21st, 2004 at 04:02 PM.

  2. #2
    VBA Nutter visualAd's Avatar
    Join Date
    Apr 2002
    Location
    Ickenham, UK
    Posts
    4,906
    Use the HTTP user agent string. This is what the browser sends along with every request. It includes information about the browser they are using and the operating system and other things like toolbars installed and anything vendor specific.
    PHP Code:
    <?php
      
    echo ('You are using: ' $_SERVER['HTTP_USER_AGENT']) ;
    ?>
    You can change the user agent string in most browsers. You can download an extension for firefox and for IE you need to change a registry value.
    PHP || MySql || Apache || Get Firefox || OpenOffice.org || Click || Slap ILMV || 1337 c0d || GotoMyPc For FREE! Part 1, Part 2

    | PHP Session --> Database Handler * Custom Error Handler * Installing PHP * HTML Form Handler * PHP 5 OOP * Using XML * Ajax * Xslt | VB6 Winsock - HTTP POST / GET * Winsock - HTTP File Upload

    Latest quote: crptcblade - VB6 executables can't be decompiled, only disassembled. And the disassembled code is even less useful than I am.

    Random VisualAd: Blog - Latest Post: When the Internet becomes Electricity!!


    Spread happiness and joy. Rate good posts.

  3. #3

    Thread Starter
    Frenzied Member Acidic's Avatar
    Join Date
    Sep 2003
    Location
    UK
    Posts
    1,090
    I know about UA strings. I didn't know the OS is stored there too. Thanks.

    And I already have the extension for that.

    Thanks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width