BlackBerry Forums Support Community               

Closed Thread
 
LinkBack Thread Tools
Old 02-25-2009, 02:03 PM   #1 (permalink)
Knows Where the Search Button Is
 
Join Date: Feb 2008
Model: none
Carrier: sprint
Posts: 24
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default

Please Login to Remove!

Wirelessly posted

Is it possible to setup my webscripts (PHP or Perl) to detect a device's OS version (not module number), so that it can automatically decide which software version to serve using OTA?
Lionscribe
Offline  
Old 02-25-2009, 02:45 PM   #2 (permalink)
Talking BlackBerry Encyclopedia
 
Join Date: Apr 2005
Location: Los Angeles, CA USA
Model: 9000
OS: 4.6.0.247
Carrier: AT&T
Posts: 209
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default

If their Browser Identification is set as Blackberry then the user agent string is usually formatted like this:

BlackBerry8900/4.6.1.114 Profile/MIDP-2.0 Configuration/CLDC-1.1 VendorID/100
BlackBerry9000/4.6.0.234 Profile/MIDP-2.0 Configuration/CLDC-1.1 VendorID/107
BlackBerry9530/4.7.0.103 Profile/MIDP-2.0 Configuration/CLDC-1.1 VendorID/105

but they could have their Browser Identification set to Firefox or Internet Explorer and then it will not contain any Blackberry specific info.

For the Blackberry user agents above, I use this in PHP:

if (preg_match('/BlackBerry[^\/]*\/(.+) Profile/i', $agent, $matches))
and then for the above user agents
$matches[1] = 4.6.1.114
$matches[1] = 4.6.0.234
$matches[1] = 4.7.0.103
Offline  
Old 02-25-2009, 03:54 PM   #3 (permalink)
Knows Where the Search Button Is
 
Join Date: Feb 2008
Model: none
Carrier: sprint
Posts: 24
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default

Wirelessly posted

Thanks! Will try.
Offline  
Closed Thread


Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

B3 5 x Switch ON-OFF Switching Inverter Car Auto Metal Lever SPST
$4.68
B3 5 x Switch ON-OFF Switching Inverter Car Auto Metal Lever SPST picture1PC Mitsubishi Inverter FR-E720-0.75K 220V 0.75K 750W New In Box
$258.5
1PC Mitsubishi Inverter FR-E720-0.75K 220V 0.75K 750W New In Box picture1Pcs Mitsubishi Inverter FR-D740-0.4K-CHT 0.4KW 380V NEW IN BOX
$263.0
1Pcs Mitsubishi Inverter FR-D740-0.4K-CHT 0.4KW 380V NEW IN BOX pictureNew Yaskawa Inverter CIMR-HB4A0005FAA 0.75KW 380V
$833.0
New Yaskawa Inverter CIMR-HB4A0005FAA 0.75KW 380V picture1PC Mitsubishi inverter chassis FR-E540-7.5K-CHT E54GA7.5D E540
$150.28
1PC  Mitsubishi inverter chassis FR-E540-7.5K-CHT E54GA7.5D E540 picture






Copyright 2004-2016 BlackBerryForums.com.
The names RIM and BlackBerry are registered Trademarks of BlackBerry Inc.