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

Does your PHP Browser detection can detect Safari Broswer version?
techpatterns.com/downloads/browser_detection.php

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?

<?php
include('browser_detection.php');
$a_browser_data = browser_detection('full');
if (SAFARI V1 or V2)
{
echo 'abc';
}
else // ALL OTHER BROWSER INCLUDING SAFARI V3
{
echo 'def';
}
?>

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

Thanks a lot for your help :)
Chris
Back to top
techAdmin
Status: Site Admin
Joined: 26 Sep 2003
Posts: 3912
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