SitePoint Sponsor

User Tag List

Results 1 to 3 of 3
  1. #1
    SitePoint Addict
    Join Date
    Sep 2008
    Location
    Rudgwick, UK
    Posts
    377
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Getting server info from clients

    Hi,

    I'm in the process of setting up a "trust" site. Basically, people put a bit of HTML onto the page - and assuming their server has the latest software/a valid SSL certificate, it will show a "good" image, otherwise it'll show a "sofware not up to date" image.

    Now, I've tried doing:

    Code:
    #!/usr/bin/perl -w
    
    print qq|Content-Type: text/html \n\n|;
    map { print qq|$_ => $ENV{$_} <br />|; } keys %ENV;
    However, although this gives me quite a bit of info - most of that is related to the script/their IP.

    Is there a way to get the values etc from them? I don't want it to be complicated - as they are gonna have to set this script up themselves. I know I can do stuff like:

    Code:
    domain@east ~ $ php --version
    PHP 5.2.6 (cgi-fcgi) (built: May  2 2008 11:38:58)
    Copyright (c) 1997-2008 The PHP Group
    Zend Engine v2.2.0, Copyright (c) 1998-2008 Zend Technologies
        with Zend Optimizer v3.3.0, Copyright (c) 1998-2007, by Zend Technologies
    domain@east ~ $
    ..and:

    Code:
    domain@east ~ $ perl --version
    
    This is perl, v5.8.4 built for x86_64-linux

    However, I'm not sure this will work on 100% of the servers (as a) it requires them to have command line access from perl script, and b) it assumes the commands run work on their server)

    Is there maybe something that can be run from our end, to determine their software versions or something?

    I'm at a bit of a dead end here (and googling comes up with bugger all too )

    TIA for any suggestions.

    Andy

  2. #2
    SitePoint Wizard bronze trophy KevinR's Avatar
    Join Date
    Nov 2004
    Location
    Moon Base Alpha
    Posts
    1,053
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Short answer: There is no way to do this consistently. Kirsle posted the long answer on Tek-tips .

  3. #3
    SitePoint Addict
    Join Date
    Sep 2008
    Location
    Rudgwick, UK
    Posts
    377
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hi,

    Cool thanks.

    I'm actually gonna go with a simple perl script that prints out $] (perl version), and then a PHP script with phpversion().

    Then, for mySQL version we are not gonna bother with that detail any more.

    The last thing to try and get - is the Apache version =)

    Cheers

    Andy


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
  •