3

I have a site which allows my customers to setup content for their customers, I'm currently capturing stats using just date/time, ip and user agent.

I was going to process the statistics into another table (or additional columns) using get_browser() but my useless host has disabled this functionality.

I've spoken to the host and they say no to turning this on, I'd rather not switch hosts if possible.

I am looking for a way to process the user agent strings to give useful information but I don't want to hard-code too much. I have tried using a large preg_match() list but it's getting too complex.

Is there any other method for decoding the user agent I can use without the browscap.ini file?

Alternatively could the statistics be shipped out to a third party (eg Google Analytics) but on a 'per customer' basis, so I can break down the usage by customer?

1 Answer 1

2

I'm using this class http://chrisschuld.com/projects/browser-php-detecting-a-users-browser-from-php/ in my project and it's working really well.

Sign up to request clarification or add additional context in comments.

2 Comments

That looks very useful, do you know if it's easily update-able (via xml/text file)?
I think you'll need to download new file when updated (just add rss to your reader). When I needed support for some browsers just added them to the code.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.