RE: [PHP-DB] getting client browser info
> -Original Message- > From: Mignon Hunter [mailto:[EMAIL PROTECTED]] > Sent: 20 January 2003 18:40 > > Ah, but I wasnt at a mozilla browser, I was accessing this > script from a > ie browser client. Let me repeat -- that was the IE browser *masquerading* as Mozilla-compatible. ALL versions of IE do exactly the same -- you have to look at the end of the parenthesis following it to get the real version information (in this case, MSIE 6.0). Cheers! Mike - Mike Ford, Electronic Information Services Adviser, Learning Support Services, Learning & Information Services, JG125, James Graham Building, Leeds Metropolitan University, Beckett Park, LEEDS, LS6 3QS, United Kingdom Email: [EMAIL PROTECTED] Tel: +44 113 283 2600 extn 4730 Fax: +44 113 283 3211 -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP-DB] getting client browser info
Ah, but I wasnt at a mozilla browser, I was accessing this script from a ie browser client. >From my mozillia client I get the following: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.0.1) Gecko/20020918 browser The script sits on an apache web server? On Mon, 2003-01-20 at 12:29, Ford, Mike [LSS] wrote: > > -Original Message- > > From: Mignon Hunter [mailto:[EMAIL PROTECTED]] > > Sent: 20 January 2003 16:32 > > > > Question: Why is it that from an IE client I get the following: > > > > Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0) > > > > Why does it say mozilla ??? > > The clue here is in the next word: "compatible" -- that's Microsoft Internet >Explorer (MSIE) 6.0 claiming it's compatible with Mozilla 4.0 browsers (of course, >it's not, but that's MS for you!). > > > > > Here's my code: > > > > Your are currently using: > > > > > > You are using : browser > > > > > > btw - Both produce the same. Is it because the apache webserver uses > > Mozilla in a default sort of way ??? hum . > > Absolutely nothing to do with Apache -- it's just reporting what the user's browser >is telling it. They're the same because they *are* the same: $HTTP_USER_AGENT is the >register_globals copy of the $_SERVER[] element. > > Cheers! > > Mike > > - > Mike Ford, Electronic Information Services Adviser, > Learning Support Services, Learning & Information Services, > JG125, James Graham Building, Leeds Metropolitan University, > Beckett Park, LEEDS, LS6 3QS, United Kingdom > Email: [EMAIL PROTECTED] > Tel: +44 113 283 2600 extn 4730 Fax: +44 113 283 3211 -- Mignon Hunter Web Developer Toshiba International 713.466.0277 x 3461 -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP-DB] getting client browser info
> -Original Message- > From: Mignon Hunter [mailto:[EMAIL PROTECTED]] > Sent: 20 January 2003 17:05 > > Does anyone know of script or tutorial to point me to that can obtain > client browser info, (got that part) > > but then using php, be able to use if statements to distinguish what > they're using. example msie 5.1 - netscape - aol...And act upon it. Perhaps you might want to look at the get_browser() function: http://www.php.net/get-browser Cheers! Mike - Mike Ford, Electronic Information Services Adviser, Learning Support Services, Learning & Information Services, JG125, James Graham Building, Leeds Metropolitan University, Beckett Park, LEEDS, LS6 3QS, United Kingdom Email: [EMAIL PROTECTED] Tel: +44 113 283 2600 extn 4730 Fax: +44 113 283 3211 -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP-DB] getting client browser info
> -Original Message- > From: Mignon Hunter [mailto:[EMAIL PROTECTED]] > Sent: 20 January 2003 16:32 > > Question: Why is it that from an IE client I get the following: > > Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0) > > Why does it say mozilla ??? The clue here is in the next word: "compatible" -- that's Microsoft Internet Explorer (MSIE) 6.0 claiming it's compatible with Mozilla 4.0 browsers (of course, it's not, but that's MS for you!). > > Here's my code: > > Your are currently using: > > > You are using : browser > > > btw - Both produce the same. Is it because the apache webserver uses > Mozilla in a default sort of way ??? hum . Absolutely nothing to do with Apache -- it's just reporting what the user's browser is telling it. They're the same because they *are* the same: $HTTP_USER_AGENT is the register_globals copy of the $_SERVER[] element. Cheers! Mike - Mike Ford, Electronic Information Services Adviser, Learning Support Services, Learning & Information Services, JG125, James Graham Building, Leeds Metropolitan University, Beckett Park, LEEDS, LS6 3QS, United Kingdom Email: [EMAIL PROTECTED] Tel: +44 113 283 2600 extn 4730 Fax: +44 113 283 3211 -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DB] getting client browser info
Hey guys, Does anyone know of script or tutorial to point me to that can obtain client browser info, (got that part) but then using php, be able to use if statements to distinguish what they're using. example msie 5.1 - netscape - aol...And act upon it. I know the logic but am clueless on the correct syntax to use with the different browser versions. Found some for asp and javascript...need php. I should probably also post this to php general Thx for any input Mignon -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP-DB] getting client browser info
Use this to get the array in which you can find the var you need: "; print_r($_SERVER); print ""; ?> So this is the var you're looking for: $_SERVER["HTTP_USER_AGENT"]; -Oorspronkelijk bericht- Van: Mignon Hunter [mailto:[EMAIL PROTECTED]] Verzonden: maandag 20 januari 2003 16:05 Aan: [EMAIL PROTECTED] Onderwerp: [PHP-DB] getting client browser info Hello all, I need a quick script to get the client's browser make and model. ie 5 ns 4.7 etc. I've found some info in two books but no examples of how to use it to get your visitors info. Not coming up with anything helpful on the php site - will continue to look. If anyone has done this and/or has an example I would be greatful Thx Mignon -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DB] getting client browser info
Well, it is a global variable/defined by PHP write a script like this: and run it. This shoudl shed some light on the situation... -Brad > Hello all, > > I need a quick script to get the client's browser make and model. > ie 5 ns 4.7 etc. > > I've found some info in two books but no examples of how to use it to > get your visitors info. Not coming up with anything helpful on the php site - > will continue to look. > > If anyone has done this and/or has an example I would be greatful > > Thx > > Mignon > > > -- > PHP Database Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DB] getting client browser info
$_SERVER['HTTP_USER_AGENT'] - contains most/all of what you need. if you want color settins etc,. you'll have to include some javascript. hth jeff Mignon Hunter <[EMAIL PROTECTED] To: [EMAIL PROTECTED] shiba.com> cc: Subject: [PHP-DB] getting client browser info 01/20/2003 10:04 AM Hello all, I need a quick script to get the client's browser make and model. ie 5 ns 4.7 etc. I've found some info in two books but no examples of how to use it to get your visitors info. Not coming up with anything helpful on the php site - will continue to look. If anyone has done this and/or has an example I would be greatful Thx Mignon -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php