Esato Mobile
Sony Ericsson / Sony : Symbian phones : Browser Detect on Website
> New Topic
> Reply
< Esato Forum Index > Sony Ericsson / Sony > Symbian phones > Browser Detect on Website Bookmark topic
randomyachtie Posts: 101

Hiya all.

I'm currently updating my website and want to detect the browser that the user is using, inorder to direct them to the part of the site which is best optimised for them. I hate visiting graphically intense sites, when all i want is a bit of text, so I want to give people the option before they download k's worth of images.

I'm using some asp script to do this, in particular the Request.ServerVariables("HTTP_USER_AGENT") comand.

I only have a P900. please could people with other phones / browsers please visit the page below, and then post the browser discription so that I can build a list of supported browsers.

http://www.deepbluerandomness.co.uk/autodetect.asp

Thanks alot.

PS The page will also tell you your mobile phones IP, which interestingly appears to be static.
--
Posted: 2004-03-13 17:51:39
Edit : Quote

richy240 Posts: 465

Dude, PM me your email address and I'll send you a database with over 700 entries in it - all types of browsers so you can compare. I've been doing the same as you for 2 weeks now.
--
Posted: 2004-03-13 18:09:00
Edit : Quote

randomyachtie Posts: 101

I'm having abit of trouble getting the file off richy240. My Mail server keeps blocking it.

I'd be really greatful if anyone could post the text after, "Your browser is:" on the above page. I've currently got info for p900 and z600, and others would be excellent.

Thanks
--
Posted: 2004-03-13 20:09:44
Edit : Quote

Aled Posts: 320

It's not static, more likely it's the ip of the wap gateway your using This message was posted from a T610
--
Posted: 2004-03-13 20:11:08
Edit : Quote

wollyka Posts: 325

i get :
Your Browser is: SonyEricssonP800/R101Profile/MIDP-1.0Configuration/CLDC-1.0UP.Link/5.1.2.4

and the ip is not my gateway ip
--
Posted: 2004-03-13 22:03:00
Edit : Quote

rotjeknor Posts: 8

I use this on my site:

Javascript:

<SCRIPT Language="JavaScript">
if (navigator.appName == 'Netscape')
var language = navigator.language;
else
var language = navigator.browserLanguage;

{
if(navigator.appVersion.indexOf("Symbian") != -1) document.location.href = 'indexppc.html';
else if(navigator.appVersion.indexOf("PPC") != -1) document.location.href = 'indexppc.html';
else if(navigator.appVersion.indexOf("Windows CE") != -1) document.location.href = 'indexppc.html';
}
</script>

+++++++++++++++++++++++++++++++++++++
Or PHP:


<?php

$browser = strtolower($_SERVER["HTTP_USER_AGENT"]);
if (strstr($browser,"symbian")) { $agent = "2"; }
elseif (strstr($browser,"sonyericsson")) { $agent = "3"; }
elseif (strstr($browser,"ppc")) { $agent = "0"; }
elseif (strstr($browser,"msie")) { $agent = "1"; }
elseif (strstr($browser,"mozilla")) { $agent = "0"; }
else {
$agent = "0";
}

$acceptbrowser = strtolower($_SERVER["HTTP_ACCEPT"]);

if ("1" == $agent)
{
header('Location: https://www.yoursite.com/index2.html'); /* Redirect browser */
}
if ("2" == $agent)
{
header('Location: http://www.yoursite.com/indexnon.html'); /* Redirect browser */
}
if ("3" == $agent)
{
header('Location: http://www.yoursite.com/indexse.html'); /* Redirect browser */
}
else
{
?>



--
Posted: 2004-03-15 11:07:18
Edit : Quote

dw Posts: > 500

I only tried it on my T610 since the gf have the T68i and
you already have a P900 to test with.

Your browser is:
SonyEricssonT610/R101 Profile/MIDP-1.0 Configuration/CLDC-1.0

--
Posted: 2004-03-15 13:48:01
Edit : Quote

New Topic   Reply
Forum Index

Esato home