BlackBerry Forums Support Community
              

Closed Thread
 
Thread Tools
Old 03-20-2006, 02:51 PM   #1
morser
Thumbs Must Hurt
 
morser's Avatar
 
Join Date: Feb 2005
Location: Windsor, On
Model: 9800
Carrier: Bell Mobility
Posts: 119
Default

Please Login to Remove!

Wirelessly posted (BlackBerry8700/4.1.0 Profile/MIDP-2.0 Configuration/CLDC-1.1 VendorID/107)

Bes4/exch2k/iis/.asp

I'm working on an Intranet page for the company blackberrys to access. When the Berrys go to the page I would like to detect all/any information I can about them. I would mainly like their blackberry model, and/or screen size, and most importantly their PIN but this may not be possible for security reasons.
I know that when a berry downloads google local it can detect the blackberry model so I know that's possible (just don't know how)
I searched on this forum and also took a quick scan through Rim pdf support doc for browser 4.0
Thanks in advance.
__________________
Morser,
History: PB32, 9800, 9700, 8310, 8700, 7100r, 7780, 7280, 6710, 957, 950
Offline  
Old 03-21-2006, 05:42 AM   #2
leoshaw
New Member
 
Join Date: Aug 2005
Model: SK65
Carrier: T-mobile
Posts: 12
Default

Not a complete answer but this might get you started, this bit of PHP will print out the User_Agent string. The Blackberry browser on a 7290 produces:

BlackBerry7290/4.0.2 Profile/MIDP-2.0 Configuration/CLDC-1.1


Here's the code (I just check for the presence of 'BlackBerry' in the string to determine which pages get served to the client):

<html>

<?php
$agent = $_SERVER['HTTP_USER_AGENT'];
echo "User agent reported as: " . $agent . "\n";

if (eregi("BlackBerry", $agent)) {
echo "BlackBerry";
}
else {
echo "Not BlackBerry";
}
?>

</html>


HTH
__________________
Leo Shaw
http://www.leoshaw.co.uk
Offline  
Old 03-21-2006, 08:50 AM   #3
mannaggia
Knows Where the Search Button Is
 
Join Date: Oct 2005
Model: 8700
Carrier: Cingular
Posts: 23
Default

You can get the PIN and user's e-mail address, but only if you are using the Blackberry Browser through BES.

You have to enable this by editing the rimpublic.properties file. In the [HTTP HANDLER] section, you can add:

application.handler.http.header = xxx

where xxx = "pin" for it to supply the PIN, "email" for it to supply the e-mail address associated with the pin, or "pin,email" to supply both.

In BES 4.x, you can also restrict it to suppying this information only for certain domains. For example, you may only want it to supply the PIN/e-mail address for your intranet domain, but not to public sites.

In your web application, you can get the PIN by querying the HTTP headers for HTTP_RIM_DEVICE_ID and HTTP_RIM_DEVICE_EMAIL. For example, in ASP, use Request.ServerVariables("HTTP_RIM_DEVICE_ID") to get the PIN.
Offline  
Old 03-23-2006, 11:31 AM   #4
morser
Thumbs Must Hurt
 
morser's Avatar
 
Join Date: Feb 2005
Location: Windsor, On
Model: 9800
Carrier: Bell Mobility
Posts: 119
Default

Great. thanks. I need the Screen resolution the most, but I should be able to separate the models by the beginning of the PIN.

Both responses were perfect. Thank you.
__________________
Morser,
History: PB32, 9800, 9700, 8310, 8700, 7100r, 7780, 7280, 6710, 957, 950
Offline  
Old 03-23-2006, 02:25 PM   #5
morser
Thumbs Must Hurt
 
morser's Avatar
 
Join Date: Feb 2005
Location: Windsor, On
Model: 9800
Carrier: Bell Mobility
Posts: 119
Default

mannaggia,

Is there a "HTTP_RIM_DEVICE_MODEL" by adding "model" to the header?
__________________
Morser,
History: PB32, 9800, 9700, 8310, 8700, 7100r, 7780, 7280, 6710, 957, 950
Offline  
Old 03-24-2006, 08:38 AM   #6
mannaggia
Knows Where the Search Button Is
 
Join Date: Oct 2005
Model: 8700
Carrier: Cingular
Posts: 23
Default

Quote:
Originally Posted by morser
Is there a "HTTP_RIM_DEVICE_MODEL" by adding "model" to the header?
It's BES that is adding HTTP_RIM_DEVICE_ID and HTTP_RIM_DEVICE_EMAIL to the http headers, and as far as I know those are the only two things it adds to the headers.

In addition to checking Request.ServerVariables("HTTP_USER_AGENT") for the model number on the server side, you can also use javascript to get it on the client side if you need it.

In javascript, the navigator.userAgent property returns the agent string containing the model number (and other stuff).

Of course, this assumes javascript is enabled.

The browser doc is at:

http://www.blackberry.com/knowledgec...65890&vernum=0
Offline  
Old 04-10-2006, 07:45 AM   #7
slygeek
Thumbs Must Hurt
 
Join Date: Feb 2006
Model: 7100
Posts: 62
Default

Hi Guys,
What about viewing a .ASP url...lets say http://url.../mine.asp..

Using blackberry browser...all values are zero..

Any idea? im using 72xx bb models....

Hope you can help me..
Offline  
Closed Thread



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

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


JOSLYN CLARK TB-137-2 CONTROLS COIL TB1372 240VDC picture

JOSLYN CLARK TB-137-2 CONTROLS COIL TB1372 240VDC

$149.00



Manual Dual Purpose Coil Winder Hand Coil Winding Machine Count 0-99999 picture

Manual Dual Purpose Coil Winder Hand Coil Winding Machine Count 0-99999

$39.05



Ignition Coil for Ford Tractor 12V 2000 3000 4000 5000 Naa600 800 1965 & Up D5TE picture

Ignition Coil for Ford Tractor 12V 2000 3000 4000 5000 Naa600 800 1965 & Up D5TE

$26.38



GE CL06A300MJ Non-Reversing IEC Contactor, 110/120 VAC V Coil, 50 A picture

GE CL06A300MJ Non-Reversing IEC Contactor, 110/120 VAC V Coil, 50 A

$299.99



8PACKS FORD F-150 5.4 5.4L V8 TRITON 2004 2005 2006 2007 2008 F150 IGNITION COIL picture

8PACKS FORD F-150 5.4 5.4L V8 TRITON 2004 2005 2006 2007 2008 F150 IGNITION COIL

$59.99



1 Pole Air Conditioner Contactor 40 Amp 24VAC Coil,Condenser Contactor Co picture

1 Pole Air Conditioner Contactor 40 Amp 24VAC Coil,Condenser Contactor Co

$23.26







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