Rob--

I'm doing something similar, although I'm going about it in a slightly
different way. I'm in the process of revising and redesigning my
website, as well as the web app that will go along with it, which is
based on the iUI framework. When all is said and done, a visitor will
go to http://seanolsondesign.com and automatically redirected to the
appropriate version of the site depending on the platform they're
viewing it from. This is done using a simple PHP user agent string
query, which I'm pasting below. Keep in mind that I'm having a problem
getting it to detect iOS 4 as well, and this is not restricted to the
new hardware. For example, my 3GS is also running 4.0 and it
experiences the same thing as a new device, which is just being served
the normal (desktop) version of the site. I'm still investigating
this, but perhaps what I have already can help in some way.

function browserDetect()
{
        $browser = get_browser(null, true);

        /*
        header("Content-Type: text/plain");
        echo $_SERVER['HTTP_USER_AGENT'] . "\n\n";
        print_r($browser);
        die();
        */
        return $browser['browser'];
}

$browser = browserDetect();

switch($browser) {
        case "iPhone": //For iPhones prior to iOS 4
        case "Mobile Safari": //For Android detection
        case "iPod": //For iPod Touch detection
                header("location: webapp/");
}

Cheers,

Sean Olson


On Jul 16, 6:51 am, RobG <[email protected]> wrote:
> On Jul 5, 11:24 pm, Stan Wiechers <[email protected]> wrote:
>
> > Rob G wrote:
> [...]
> > > Hopefully you advise clients of the difficulty of reliably detecting
> > > underlying platforms and provide an estimate of accuracy when
> > > reporting data or statistics.
>
> > As I said before we found that be accurate otherwise we would *not* use it.
>
> What I'm asking is what is your estimate of accuracy of detection? How
> you went about determining that accuracy would be interesting too.
>
> > And you always need to take statistics with a grain of salt for reasons
> > ranging from the data set, data point identification, data presentation to
> > agendas.
>
> Yes, and statistics presented without error estimates are useless.
>
> > Give it a try if you want and let us know what you think! Open to
> > feedback.
>
> That was my feedback - what is your estimate of the error of
> detection? If you are into statistics, you should know how to
> determine that and report it.
>
> --
> Rob

-- 
You received this message because you are subscribed to the Google Groups 
"iPhoneWebDev" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/iphonewebdev?hl=en.

Reply via email to