Piwik API best practice?


I am using curl to fetch data from Piwik. I am using Get requests on piwik (http://example.com/piwik) and am displaying the data on http://example.com/dashboard

Is this the ideal way to do it?
If I make 5 calls to Piwik to load the data on http://example.com/dashboard, the api calls take about 10 seconds, in all, even though the data is almost non-existent.

Is there an alternate to using curl?
Is there an api php wrapper, so I don’t have to make http requests?
What would the best practice be in this case?


I’m using .net, not php, but faced the same issue. I used the bulk api instead, you can send multiple queries in one request and get all the results in one response. Perhaps this is what you need.

http://piwik.org/docs/analytics-api/reference/ and do a Find for the words “Bulk”


For anyone else looking for the answer, for PHP, use this