Page: 1, 2  Next

Dificulties detection correct browser on mobile phones
Squazz
Status: Curious
Joined: 05 Jul 2012
Posts: 7
Reply Quote
I have the feeling that this might have been up once or twice before, found these posts:

techpatterns.com/forums/about2025.html

You are telling the user to send you a useragent string, what is this, and how do I get it? :)

I'm currently using the 5.4.2 version of the script from: techpatterns.com/downloads/php_browser_detection.php

Anywho, mu problems, that might be caused my crappy programmed browsers, or an actual bug in the script.

So I tried this on my iPhones. I have installed Safari, Chrome and Apollo.

On my Safari, it tells me it's a safari 7534.48.3 browser, I'm cool with that
On my Crome browser it tells me that it's a safari 7534.48.3 browser, I'm not really cool with that. The AppStore tells me that it's a Chrome 19.1084.60
The Apollo tries to tell me that it's a applewebkit 534.46, and well, it's better than telling me it's a Safari, at least I can make my script change applewebkit with "apollo", but I'm not really sure about the version number :)

In fact, I don't really trust any of the version numbers :)

I have these images from my website, I don't know if they can help?

<do not post images of text output like you did, copy the actual data and post it into a code or quote box.>
Back to top
techAdmin
Status: Site Admin
Joined: 26 Sep 2003
Posts: 4128
Location: East Coast, West Coast? I know it's one of them.
Reply Quote
I'll look at this if you post your actual text data for the output, why you used screen shots that don't even show the entire thing is beyond me.

code is code, and pictures are pictures.

the home page for php browser detection script shows you useragent string at the bottom of the page.

I can't debug an issues without seeing the TEXT of the data, not pictures, I'm not going to type stuff in by hand just because you haven't learned to copy and paste plain text.

So what I need is this, the text output strings, precise, exact, of the user agents of the 3 iphone browsers.

Then you can put the text output of the returned browser detection stuff.

If this can't be done then I'm not spending time on the issue.

I do know that apollo is not a known webkit based browser, but if I don't have the useragent strings, I can't test the stuff or debug it.
Back to top
Squazz
Status: Curious
Joined: 05 Jul 2012
Posts: 7
Reply Quote
Safari
Mozilla/5.0 (iPhone; CPU iPhone OS 5_1_1 like Mac OS X) AppleWebKit/534.46 (KHTML, like Gecko) Version/5.1 Mobile/9B206 Safari/7534.48.3

Apollo
Mozilla/5.0 (iPhone; CPU iPhone OS 5_1_1 like Mac OS X) AppleWebKit/534.46 (KHTML, like Gecko) Mobile/9B206

Chrome
Mozilla/5.0 (iPhone; U; CPU iPhone OS 5_1_1 like Mac OS X; da-dk) AppleWebKit/534.46.0 (KHTML, like Gecko) CriOS/19.0.1084.60 Mobile/9B206 Safari/7534.48.3
Back to top
techAdmin
Status: Site Admin
Joined: 26 Sep 2003
Posts: 4128
Location: East Coast, West Coast? I know it's one of them.
Reply Quote
as you can see, apollo shows Mobile/9B206 as the only string that could possibly maybe be unique to it.

CriOS/19.0.1084.60

however does show a clear useragent, but a shortened one, Cr (chrome) and iOs, for CriOS

this is not a standard chrome user agent, usually chrome appears in the string as Chrome.

thanks for the ua strings.

normally what the browser detection does is look for strings in cascading order, ie, it will get chrome before safari, no chrome detected by script but safari found, defaults to safari in that case, no known webkit type browser found, default to webkit. So you can see the browser detection is working exactly as intended, the chrome can be handled since it's unique, the apollo no.

so no bugs in browsre detection, but some after market browsres in ios appear to have non standard useragent strings.

Generally what the browser detector returns is the found string, but in this case those strings wouldn't communicate a lot, but they can be added as webkit browser types.

Mobile/9B206 however is not known in terms of if that's unique to apollo, and mobile certainly can't be used as a unique search term for apolo.
Back to top
Squazz
Status: Curious
Joined: 05 Jul 2012
Posts: 7
Reply Quote
Well, when getting the UA string from your site, i got what i sent you. But when taking the full_assoc with the function, I get this array:

Array ( [browser_working] => webkit [browser_number] => 534.46.0 [ie_version] => [dom] => 1 [safe] => 1 [os] => iphone [os_number] => 10 [browser_name] => safari [ua_type] => mobile [browser_math_number] => 534.46 [moz_data] => Array ( [0] => [1] => [2] => [3] => [4] => ) [webkit_data] => Array ( [0] => safari [1] => 7534.48.3 [2] => 534.46.0 ) [mobile_test] => iphone [mobile_data] => Array ( [0] => iphone [1] => [2] => [3] => iphone os [4] => 5.1.1 [5] => [6] => [7] => [8] => ) [true_ie_number] => [run_time] => 0.00038815 [html_type] => 3 [engine_data] => Array ( [0] => webkit [1] => 534.46.0 [2] => 534.46 ) )
Back to top
techAdmin
Status: Site Admin
Joined: 26 Sep 2003
Posts: 4128
Location: East Coast, West Coast? I know it's one of them.
Reply Quote
the array is just various things deduced from the string, the useragent strings are what matter.

and they are clear enough, there is no confusion there, the browsrs have irregular useragents (why does that not surprise me for an apple controlled product?).

apollo i'd file a bug report with if i were you, if they want their browser to be recognized they should give it a real name in the useragent string.
Back to top
Squazz
Status: Curious
Joined: 05 Jul 2012
Posts: 7
Reply Quote
Which function should we use when we want to get the correct information in an array so we can submit the information to the database? ;)

I thought I got all the informations, now I see that I don't :/
Back to top
techAdmin
Status: Site Admin
Joined: 26 Sep 2003
Posts: 4128
Location: East Coast, West Coast? I know it's one of them.
Reply Quote
ummm, if you totally ignore the words I write when responding to your question, it doesn't motivate me much to answer again.

Since I've already answered your question I don't see any point in doing so again.

However, I will slightly rephrase it:

apollo has no viable user agent id, period. That's a bug in their end, not my problem.

iphone chrome uses an iphone only useragent id, crios, and that can be added though it's not very informative, to the usre agent detection array for webkit types.

i'll do that in a bit, can' t get to it at the moment.

Again, since you're totally ignoring my responses I'm not spending any more time on this issue beyond noting that the new webkit type browser will be added in about 2 weeks.
Back to top
Squazz
Status: Curious
Joined: 05 Jul 2012
Posts: 7
Reply Quote
I am SO sorry, really :(
I really don't hope I have said something wrong that made you mad, I just, don't know much about this topic. I DO read what you are writing.

You told me the array was just various things deducted from the string, and that the useragentstring was what mattered. And with your sentence:

"So you can see the browser detection is working exactly as intended, the chrome can be handled since it's unique, the apollo no. "

I thought that it was possible for me to detect the iOs chrome browser with an another function. That I might be using the wrong function for the job.

But with your sentence:

"iphone chrome uses an iphone only useragent id, crios, and that can be added though it's not very informative, to the usre agent detection array for webkit types."

I guess that it's not possible yet, and that the script needs an update?

I know I may seem kinda stupid for you, I'll take that with me.

Sorry for the trouble and frustrations. Sorry
Back to top
techAdmin
Status: Site Admin
Joined: 26 Sep 2003
Posts: 4128
Location: East Coast, West Coast? I know it's one of them.
Reply Quote
no worries, let me rephrase what i said, apparently you didn't understand what I wrote, that's completely different than not reading.

so short answer, yes, ios chrome can be id'ed and yes the script will need an update, which I'll do in about a week.

apollo for ios isn't really practical to id.

So I'll post in this thread in about 8-10 days and let you know when the updated script is available, it's an easy update for me I just don't have the time at the moment to get to it.
Back to top
Display posts from previous:   
Page: 1, 2  Next
All times are GMT - 8 Hours