Need help Browser Detection
Status: New User - Welcome
Joined: 04 May 2008
Posts: 1
Reply Quote

Does your PHP Browser detection can detect Safari Broswer version?

I would like to add a Safari version detection to my Web page, to be able to modify a code line in the page depending of this browser version.
Could you help me to write this code?

$a_browser_data = browser_detection('full');
if (SAFARI V1 or V2)
echo 'abc';
echo 'def';

If it's not possible with the JavaScript Browser detection?

Thanks a lot for your help :)
Back to top
Status: Site Admin
Joined: 26 Sep 2003
Posts: 4124
Location: East Coast, West Coast? I know it's one of them.
Reply Quote
Yes, it does, if you understand how the webkit useragent strings work.

See this webkit + omniweb for some details.

In answer to your question, will we write your code for you? The answer is no, sorry, that's your job, not mine, we just provide the tool for you to use as you see fit, under the gpl. We do not write, nor do we have any interest in writing, your code for you, for free.

Good luck, to make it easier, however, there is not really a v1/v2 I believe with webkit based browsers (and its webkit, not safari, that you are searching for, since all browsers based on webkit would need the code fix, not just safari.

I haven't followed apple webkit/safari naming conventions, it used to be numbers like 87, 124, and so on, or something like that.

It's the true version numbers you must test for, not the superficial stuff.
Back to top
Display posts from previous:   

All times are GMT - 8 Hours