Give access to current user info

Many of us (as a webmaster) have code in their project that detect a visitors browser, screen, plugins etc… and adapt the page accordingly. But since Piwik already has that info, wouldn’t it be simpler if we could use the piwik api to get the current visitor info, and we could simpy do something like this in our pages?

<?php include("../piwik/visitor.class.php); $visitor = new piwikVisitor; $country = $visitor->getCountry(); if($country == "US") { //do some stuff on the page } ?>

That way we don’t have to reinvent the wheel to make our website get info about our users.

Would also love to see such an functionality