|
|
03-20-2006, 02:51 PM
|
#1
|
Thumbs Must Hurt
Join Date: Feb 2005
Location: Windsor, On
Model: 9800
Carrier: Bell Mobility
Posts: 119
|
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
|
|
03-21-2006, 05:42 AM
|
#2
|
New Member
Join Date: Aug 2005
Model: SK65
Carrier: T-mobile
Posts: 12
|
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
|
Offline
|
|
03-21-2006, 08:50 AM
|
#3
|
Knows Where the Search Button Is
Join Date: Oct 2005
Model: 8700
Carrier: Cingular
Posts: 23
|
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
|
|
03-23-2006, 11:31 AM
|
#4
|
Thumbs Must Hurt
Join Date: Feb 2005
Location: Windsor, On
Model: 9800
Carrier: Bell Mobility
Posts: 119
|
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
|
|
03-23-2006, 02:25 PM
|
#5
|
Thumbs Must Hurt
Join Date: Feb 2005
Location: Windsor, On
Model: 9800
Carrier: Bell Mobility
Posts: 119
|
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
|
|
03-24-2006, 08:38 AM
|
#6
|
Knows Where the Search Button Is
Join Date: Oct 2005
Model: 8700
Carrier: Cingular
Posts: 23
|
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
|
|
04-10-2006, 07:45 AM
|
#7
|
Thumbs Must Hurt
Join Date: Feb 2006
Model: 7100
Posts: 62
|
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
|
|
|
|